Hacker News new | ask | show | jobs
by mwigdahl 3230 days ago
In ES2017 this gets substantially better:

const arr2 = Object.values({...arr, 3: 'New Content'});