0.5.4
- Objects can now use number literals and reserved words as keys.
- Classes can now have computed properties.
- Classes can now use number literals and reserved words as method and property names.
- Accessing an object member with the
.
operator now allows for reserved words to be used as identifiers.
In short, all of these are now acceptable syntax:
let object = { 100: 'foo', function: 'bar' };
class Foo {
['foo']() { }
100() { }
undefined() { }
}
console.log(object.function); // bar