How can I skip an array element in .map?
.map
My code:
var sources = images.map(function (img) { if(img.src.split(\'.\').pop() === \"json
Answer sans superfluous edge cases:
const thingsWithoutNulls = things.reduce((acc, thing) => { if (thing !== null) { acc.push(thing); } return acc; }, [])