Last active
March 7, 2019 18:06
-
-
Save viswesh/4d3487f9bad198f1c5b6161f451f5780 to your computer and use it in GitHub Desktop.
ES6 Class
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
class Person { //instance method | |
speak() { | |
console.log(‘speak’); | |
} | |
} | |
class Person { //static method | |
static isHuman() {} | |
} | |
class Person { //initialize instances | |
constructor(arguments) {} | |
} | |
class Person extends Human { //syntantic sugar over Person.prototype = Object.create(Human.Prototype); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment