遍歷數組的經常使用方法

1.最傳統方法 for循環 var arr = ["first","second","third","fourth",3,5,8]; for(var i = 0; i < arr.length;i++){ console.log(arr[i]); } //輸出: first second third fourth
相關文章
相關標籤/搜索