I would like to know how to check if an array is empty or null in jQuery. I tried array.length === 0 but it didn\'t work. It did not throw any error either.
User JQuery is EmptyObject to check whether array is contains elements or not.
var testArray=[1,2,3,4,5];
var testArray1=[];
console.log(jQuery.isEmptyObject(testArray)); //false
console.log(jQuery.isEmptyObject(testArray1)); //true