Having this input:
const myArray = ["", "", "test"];
I want to count the number of empty strings, for the above example it is 2. A complicated method would be
myArray.map(a => a.length === 0)
which returns a new array of true and false and after that to count them.
Is there a shorter method to do this?