for…of 特点:1.代码简洁 2.key和value可以分开遍历 3.可以跳出循环 for (key of arr) { console.log(key); } for (key of arr.keys()) { console.log(key); } for (key of arr.values()) { console.log(key); } for ([key, value] of arr.entries()) { if (key == 2) { continue } console.log(key); console.log(value); }