SyntaxFix
Write A Post
Hire A Developer
Questions
If length is undefined you can use:
length
function count(array){ var c = 0; for(i in array) // in returns key, not object if(array[i] != undefined) c++; return c; } var total = count(array);