Похожие чаты

Is it write to actually use loops inside a loop??

14 ответов

17 просмотров

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 } }

A​kshit
No, you just do something similar to const n = 1...

the new parser is clearly broken. I wrote perfectly valid stuff here and its inconsistent between clients and all smh

EMMIaNT- Автор вопроса
A​kshit
No, you just do something similar to const n = 1...

Buh using the bottom one is more readable than the first

EMMIaNT
Buh using the bottom one is more readable than the...

it was a joke, never use the first one. Its slower and unreadable.

EMMIaNT- Автор вопроса
EMMIaNT- Автор вопроса
A​kshit
No, you just do something similar to const n = 1...

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); } }

EMMIaNT- Автор вопроса
EMMIaNT
What about using let?? Something like this: let ar...

You actually don't need let here. const will work just fine.

EMMIaNT- Автор вопроса

Похожие вопросы

Обсуждают сегодня

Сообщение* в закодированном виде. То есть, просто сделать sendMessage?text=Привет бла-бла! не получится, надо в HEX переводить, и добавлять процент, типа такого: sendMessage?t...
КТ315
21
А случайно нет ли в паскале штатной возможности передать указатель и количество туда где array of в качестве аргумента?
zamtmn
25
@LGCYMan @JustinKKW Q/A List 1. this part confuses me on #8: "From there, a bridge between erc20 LGXY and erc20 LGXY will be out once that swap is closed." does this mean ...
Sig | LGCY | BattleVerse L1 | BitWin
1
Хм. А телеграм апи работают через HTTP?
The Bird of Hermes
14
Почему Telegram пишет, что объект media не найден, хотя на самом деле я его передаю? Делаю на urllib, без зависимостей, так надо. Вызываю метод sendMediaGroup с таким JSON: ...
Alexey S
1
Anyone here suffers from unexplained aural migraines, who would be up for talking for a bit? Doesn't *have* to be aural, but I am not asking about headaches, I mean actual mi...
Martin Rys
58
Ну раз я пока тут, задам пару глупых вопросов. Зачем писать на ассемблере если компилятор довольно умный, а ассемблер много времени занимает? В каких прикладных задачах сейчас...
Максим Рябцев
20
Did @Beeker really get banned? That's ridiculous. He's one of the few left here with half a brain and you might not always like his narrative @dgb_ycagel , but he often keeps ...
Leroy Gerrits
1
How do I get FrxEth? Need it to execute a contract
Abdullah $BTON
18
Maine b!nance se wazirx mein 200$ deposit kiya and usdt/inr pair mein sell krdiya 1% tds kata and maine inr withdrawal krliya , ab usme 30% tax dena hoga kya?
Xanime
14
Карта сайта