Last active
January 10, 2018 02:39
-
-
Save Storyyeller/97447000fbda6f75e73432629a4c3a41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Foo(x) { | |
this.x = x; | |
this.y = 432; | |
} | |
Foo.prototype.point = function() { | |
return 'Foo(' + this.x + ', ' + this.y + ')'; | |
} | |
var myfoo = new Foo(99); | |
console.log(myfoo.point()); // prints "Foo(99, 432)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment