It's basically iterating over an array an if the index's value is equals to 2 it marks the corresponding array's index as 1
Yes
Do you know what time complexity this would have? for (let i = 1; i <= array.length; i *= 2) { console.log(array[i - 1]); }
Обсуждают сегодня