- a
constructor
! super
- no commas between methods!
- naming methods comes for free!
- you can't call a class like a function.
typeof Point === 'function'
butPoint() // TypeError
- classes, unlike function declarations aren't hoisted!
- static methods! For less memory use and consistency across the prototype.
- es6 lets you programatically define keys with
{ [key]: true }
- you can't create duplicate class names
- no more need for
use strict
! you just get it for free! - the eslint is the only linter that supports es6 and it's still a bit buggy. We're gonna have to deal with this as they fix things.