0
how to calculate array length
if i have array like this ["php""js""Sql"] how to calculate lengeth
2 ответов
+ 3
var arr = ["php", "js", "sql"];
document.write(arr.length);
0
As Zen mentioned, the "length" method is the best way.
Here's more about it from MDN - https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/length