Array iterator method to split small tips of key-value pairs
Destructuring using ES6 makes it very easy to split key/value pairs in a loop
const a = ["foo", "bar", "baz", "qux"];
for (const [idx, element] of a.entries()) {
alert(idx);
alert(element);
}
// 0
// foo
// 1
// bar
// 2
// baz
// 3
// qux
真是niceeeeeeeeeeeeee!