let aaloo = 1 let bhaaloo = 2 const obj1 = { aaloo: aaloo, bhaaloo: bhaaloo } console.log(obj1) const obj2 = { aaloo, bhaaloo } console.log(obj2) // { aaloo: 1, bhaaloo: 2}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter