Created
March 9, 2017 08:30
-
-
Save debugmodedotnet/90418c0e9b76b02443341c44391b5ed1 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
var Student = class s { | |
constructor(name, age) { | |
this.name = name; | |
this.age = age; | |
} | |
getData() { | |
console.log(this.name + " is " + this.age + " years old !"); | |
} | |
toString() { | |
return `(${this.name},${this.age})`; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment