#es6
Jun 08, 2021
How to Set Dynamic Property Keys with ES6
Previously, we could achieve that by two steps: Create the object literalthen use the bracket notation. let value = 'cake'; //requires 2 steps let pan = { id: 1, }; pan = '?'; // o...