SyntaxFix
Write A Post
Hire A Developer
Questions
In ES6 you can do this:
let cake = ''; let pan = { [cake]: '', }; // Output -> { '': '' }
Old Way
let cake = ''; let pan = {}; pan[cake] = ''; // Output -> { '': '' }