sometimes
No, you just do something similar to const n = 10; const m = 20; for (let i = 0; i < n * m; i++) { // Stuff if (i % n === 0) { // More stuff } } rather than const n = 10; const m = 20; for (let i = 0; i < n; i++) { // More stuff for (let j = 0; j < m; j++) { // Stuff } }
the new parser is clearly broken. I wrote perfectly valid stuff here and its inconsistent between clients and all smh
First one can be MUCH slower
thatsthejoke.png
Buh using the bottom one is more readable than the first
it was a joke, never use the first one. Its slower and unreadable.
What about using let?? Something like this: let arrOfArrays = []; for (let i = 0; i < 3; i++){ arrOfArrays.push([]); for (let j = 0; j < 7; j++) { arrOfArrays[i].push(j); } }
Ohk.. thanks
You actually don't need let here. const will work just fine.
Only for the array
Обсуждают сегодня