Open In App

Web technologies Questions | JavaScript Course Quiz 1 | Question 25

Last Updated : 26 Aug, 2021
Like Article
Like
Save
Share
Report

What will be the output of the following code snippet
let data=7
while(data>=0)
{
if(data<=5) { data--; continue; } console.log(data); data--; } (A) 7 6 5 4 3 2 1 0
(B) 7 6 5

(C) 7 6
(D) 0 1 2 3 4 5


Answer: (C)

Explanation: Once data becomes equal to 5 the console.log() statement will be ignored because of the continue keyword.


Quiz of this Question
Please comment below if you find anything wrong in the above post


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads