[2622 views]
Sometimes while writing a javascript code, we need to validate whether an array is empty or not to prevent js code from given irrelevant output. In this article, I have mentioned some ways to verify if array is empty in Javascript
In the above code, array.constructor checks if the object is an Array.