In certain situations, it may happen that we have undefined
or generally falsy values in Array structures. For instance when reading and filling data from some unknown sources like Databases or HTML structures. Like
var data = [42, 21, undefined, 50, 40, undefined, 9]
Since that might cause trouble when looping over such arrays and working on the elements, what is the best practice to remove undefined
(falsy values) ?