This content originally appeared on DEV Community and was authored by Shuvo
Try to guess the output of this code without running it. Let me know in the comment what you got
let num = 10;
for(let i = 0; i < num; i++){
console.log(num);
num--;
}
hint: You may have got the first half right
This content originally appeared on DEV Community and was authored by Shuvo
Print
Share
Comment
Cite
Upload
Translate
Updates
There are no updates yet.
Click the Upload button above to add an update.

APA
MLA
Shuvo | Sciencx (2021-10-19T03:29:55+00:00) Guess the output of this JS code. Retrieved from https://www.scien.cx/2021/10/19/guess-the-output-of-this-js-code/
" » Guess the output of this JS code." Shuvo | Sciencx - Tuesday October 19, 2021, https://www.scien.cx/2021/10/19/guess-the-output-of-this-js-code/
HARVARDShuvo | Sciencx Tuesday October 19, 2021 » Guess the output of this JS code., viewed ,<https://www.scien.cx/2021/10/19/guess-the-output-of-this-js-code/>
VANCOUVERShuvo | Sciencx - » Guess the output of this JS code. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/10/19/guess-the-output-of-this-js-code/
CHICAGO" » Guess the output of this JS code." Shuvo | Sciencx - Accessed . https://www.scien.cx/2021/10/19/guess-the-output-of-this-js-code/
IEEE" » Guess the output of this JS code." Shuvo | Sciencx [Online]. Available: https://www.scien.cx/2021/10/19/guess-the-output-of-this-js-code/. [Accessed: ]
rf:citation » Guess the output of this JS code | Shuvo | Sciencx | https://www.scien.cx/2021/10/19/guess-the-output-of-this-js-code/ |
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.