Created
June 3, 2016 21:06
-
-
Save alejandrorangel/eb4072bec7d1dfb49571d27c2b99589c 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 Product() { | |
this.type = ""; | |
this.color = ""; | |
this.getInfo = function() { | |
return this.color + ' ' + this.type; | |
}; | |
} | |
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - | |
function Product() { | |
this.type = ""; | |
this.color = ""; | |
} | |
Product.prototype.getInfo = function() { | |
return this.color + ' ' + this.type; | |
}; | |
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - | |
class Product { | |
constructor() { | |
this.type = ""; | |
this.color = ""; | |
} | |
getInfo() { | |
return this.color + ' ' + this.type; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment