遍历数组的元素: for (let i=0; i<arr.length; i++) — 运行得最快,可兼容旧版本浏览器。 for (let item of arr) — 现代语法,只能访问 items。 for (let i in arr) — 永远不要用这个。