ES6 introduced several improvements to object literals in JavaScript:
- Property shorthand
- Method shorthand
- Computed property names
- Shorthand for prototypes / super
- Concise notation for object destructuring defaults (combined with literals)
1. Property Shorthand
Before ES6, if the property name and variable name were the same, you had to write:
