1. Create an array of all 0s and length 100 (ES6)
Array(10).fill(0)
2. Create an array of length 100, which stores 0 ~ 99
let array = Array(100).fill(0).map((item, index) => index);
1. Create an array of all 0s and length 100 (ES6)
Array(10).fill(0)
2. Create an array of length 100, which stores 0 ~ 99
let array = Array(100).fill(0).map((item, index) => index);