Skip to content

Instantly share code, notes, and snippets.

@viswesh
Last active March 7, 2019 18:06
Show Gist options
  • Save viswesh/4d3487f9bad198f1c5b6161f451f5780 to your computer and use it in GitHub Desktop.
Save viswesh/4d3487f9bad198f1c5b6161f451f5780 to your computer and use it in GitHub Desktop.
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