In certain situations, it may happen that we have undefined or generally falsy values in Array structures. For instance when reading and filling data f
undefined
If you have an array of objects and want to remove all null and undefined items:
null
[].filter(item => !!item);