myArray.forEach(function (value) { console.log(value); });. 写法简单了许多,但也有短处:你不能中断循环(使用break语句或使用return语句。
確定! 回上一頁