JS useful tricks
Javascript useful things
Small standard JavaScript functions that I tend to forget, with links to MDN.
Clone and merge objects
// clone
const copy = Object.assign({}, obj);
// merge
const merged = Object.assign(o1, o2, o3);Find in array
const item = items.find(p => p.id === 1);