+ 1

What is the output of this code? let x = 0; for(let i=0;i<3;i++) { x+=i; } console.log(x);

What is the output of this code? let x = 0; for(let i=0;i<3;i++) { x+=i; } console.log(x);

21st Jan 2023, 9:02 AM
Lusine Galstyan Nikolay
Lusine Galstyan Nikolay - avatar
5 Respuestas
+ 4
Why not to check in Code Playground? 0 + 1 + 2 = 3
21st Jan 2023, 9:11 AM
A͢J
A͢J - avatar
+ 1
To access the playground. Tap on your profile pic to view your profile. Scroll down and tap "See Activity" From the top, tap CODE BITS Now tap the green circle with the ( + ) Choose a language to enter the coding playground.
22nd Jan 2023, 5:24 AM
Chris Coder
Chris Coder - avatar
0
Thanks. I already got the answer. But I am not very easy in the playground. Would you guide me on how to do that? Thanks again.
21st Jan 2023, 9:29 AM
Lusine Galstyan Nikolay
Lusine Galstyan Nikolay - avatar
0
What did you mean by "not very easy in the playground"?
21st Jan 2023, 10:15 AM
Ipang
0
never mind, Ipang
21st Jan 2023, 11:54 AM
Lusine Galstyan Nikolay
Lusine Galstyan Nikolay - avatar