• Kurse
  • Code Compiler
  • Diskutieren
  • Preise
  • Teams
Menu
+ 3

for loops

Hi everyone, pls why is the output of this loop 10? var x = 2; for(i = 0; i < 4; i++) { x += 2; } document.write(x);

javascript
28th May 2021, 3:03 PM
Lara
Lara - avatar
2 Antworten
+ 5
https://code.sololearn.com/WSb9uaWyk7z8/?ref=app
28th May 2021, 3:28 PM
JaScript
JaScript - avatar
+ 2
Thank you :)
28th May 2021, 3:43 PM
Lara
Lara - avatar

Häufig solche Fragen?

Effizienter lernen, kostenlos:

  • Einführung in Python

    7.1M Lernende

  • Einführung in Java

    4.7M Lernende

  • Einführung in C

    1.5M Lernende

  • Einführung in HTML

    7.5M Lernende

Alle Kurse anzeigen
Heute heiß
I have finished first in Saturn League 3 times in a row, why have I not been given the badge for “Intergalactic Champion”
4 Votes
Python intermediate help with dictionaries
0 Votes
Marquee
1 Votes
Fill in the blank to declare a static variable.
0 Votes
What are the advantages and disadvantages of using let vs var when declaring variables in JavaScript?
0 Votes
Any Advise?
1 Votes
RUST'S FUTURE
1 Votes
How far do courses go on Sololearn?
0 Votes
Popsacles Aufgabe
1 Votes
I'm about to make a complex calculator in python
0 Votes