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
 EMMIaNT
                          
                        
                      
                    
                    
                    
                    
                      Автор вопроса
                      
                      
                        
                          EMMIaNT
                          
                        
                      
                    
                    
                    
                    
                      Автор вопроса
                    
                    
                  Buh using the bottom one is more readable than the first
it was a joke, never use the first one. Its slower and unreadable.
 EMMIaNT
                          
                        
                      
                    
                    
                    
                    
                      Автор вопроса
                      
                      
                        
                          EMMIaNT
                          
                        
                      
                    
                    
                    
                    
                      Автор вопроса
                    
                    
                   EMMIaNT
                          
                        
                      
                    
                    
                    
                    
                      Автор вопроса
                      
                      
                        
                          EMMIaNT
                          
                        
                      
                    
                    
                    
                    
                      Автор вопроса
                    
                    
                  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
                          
                        
                      
                    
                    
                    
                    
                      Автор вопроса
                    
                    
                  Ohk.. thanks
You actually don't need let here. const will work just fine.
 EMMIaNT
                          
                        
                      
                    
                    
                    
                    
                      Автор вопроса
                      
                      
                        
                          EMMIaNT
                          
                        
                      
                    
                    
                    
                    
                      Автор вопроса
                    
                    
                  Only for the array
Обсуждают сегодня