1.for Each循环 与java中增强for循环相同思想 let age = [1,5,3,8,4,6,4,5,2,4,6]; //forEach循环 age.forEach(function (value) { console.log(value); }); 2.for In循环 index是age的索引值 let age = [1,5,3,8,4,6,4,5,2,4,6]; //forIn循环 for (let index in age){ console.log(age[index]); }