Object Property - Shorthand Notation

introduction to destructuring in ES5 and its equivalent notation in ES6

One of the most common tasks in JavaScript is to build, mutate, and extract data from objects and arrays. ES2015 makes this process very compact with destructuring.

Suppose we have the following ES5 code:

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.