How to find whether the particular array variable is empty or not in JavaScript? -
How to find whether the particular array variable is empty or not in JavaScript? -
i have array variable array[0], , need check whether array[0] contains value or not within of it. should do?
if have array , phone call eg. list, can check if has elements in next manner:
if (list.length){ // has elements (exactly list.length elements) } else { // not have elements } see next details: documentation on length property of array objects in javascript
javascript
Comments
Post a Comment