Skip to content

Instantly share code, notes, and snippets.

@viswesh viswesh/es6class.js
Last active Mar 7, 2019

Embed
What would you like to do?
ES6 Class
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
You can’t perform that action at this time.