Enhanced object literals

Once, JavaScript required developers to write complete function names, property names, even when the function name / property name values matched each other (example: var a = { obj: obj }). However, ES6/ES7/ES8 and beyond relaxes this and allows the minification and readability of code in a number of ways. Let us see how.

Get Learn ECMAScript - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.