For more JavaScript tips & tricks 👉 https://youtu.be/ZI3q-_vjSZE
4 years ago (edited) | 1
i = 0 so it shows the first value assigned to the binding (which is 0), then it repeats the loop until the condition of i < 5 is false (which happens after the 5th log, with the number 4, is printed). Since the Boolean false won't execute the loop, it won't print number 5. I'm just starting on JS so I'd appreciate any feedback 😋
4 years ago
| 25
My brain always tries to overthink this questions ...
4 years ago (edited)
| 18
That will be the good idea if youtubeer provide us some test per week on different topics not many questions that maybe minimum 10 technical questions ,I think this will be good for students as well as owner to get many subscriber
4 years ago (edited)
| 1
Technically seen none since console.log() prints a new line each time! ;P
4 years ago
| 0
I=0 so started from 0 onwards and condition i<5 so 0,1,2,3,4 is the output if the condition is i <=5 means 5also will be their in ouput...
4 years ago
| 0
At 4am the less than looked like a greater than. I guess I know when it is not safe to program.
4 years ago (edited)
| 0
codeSTACKr
In JavaScript, what would be the result in the console of running this code?
for (let i = 0; i < 5; i++) {
console.log(i);
}
For more JavaScript tips & tricks 👉 https://youtu.be/ZI3q-_vjSZE
4 years ago | [YT] | 197