Created
August 10, 2018 23:14
-
-
Save springmeyer/7bf380d422245577f7103c7bc0562a34 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
// generic code | |
// interface | |
var Coord = function() { | |
this.one = 'one'; | |
}; | |
Coord.two = function() { | |
return 'two'; | |
}; | |
Coord.prototype.two = function() { | |
return 'two'; | |
}; | |
// usage | |
var coord_instance = new Coord(); | |
console.log(Coord.two()) | |
//console.log(coord_instance.one); | |
console.log(coord_instance.two()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment