blob: c3fb613ac6094aec3c956376239fef7deb0bea3a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
function Point(x,y) {
this.x = 10
this.y = 20
}
Point.prototype = {
print: function() { print(this.x, this.y) }
}
var pt = new Point(10, 20)
print(pt.x, pt.y)
pt.print()
|