标签: jquery arrays indexing
似乎很简单,但我找不到任何东西!
var cookie = [1,2,3], total = cookie.magicMethodThatICantFindThatTotalsTheElements(); total = 3
答案 0 :(得分:2)
属性length指定数组中元素的数量:
length
var total = cookie.length;