Menu mobile
Home
Programming
Python Tutorial
Java Tutorial
C Tutorial
C++ Tutorial
Web Technology
HTML
CSS
Java Script
PHP
React JS
Node JS
Assignment
MS Office
HTML
CSS
Bootstrap
Java Script
JQuery
AngularJs
Project
Blog
QUIZ ON : javascript - JS CONTROL FLOW AND LOOPS
JS CONTROL FLOW AND LOOPS
00:00:00
English
Hindi
Question No# :
01
out of 13
Can we nest loops in JavaScript?
क्या हम जावास्क्रिप्ट में लूप्स को नेस्ट कर सकते हैं?
A.
Yes, but only two levels deep
Yes, but only two levels deep
B.
No, nesting loops is not allowed
No, nesting loops is not allowed
C.
Yes, we can nest any number of loops
Yes, we can nest any number of loops
D.
Yes, but only with for loops
Yes, but only with for loops
Question No# :
02
out of 13
Which of the following is true about the break and continue statements in JavaScript?
जावास्क्रिप्ट में ब्रेक और कंटीन्यू स्टेटमेंट के बारे में निम्नलिखित में से कौन सा सत्य है?
A.
break statement stops the loop, and continue skips the current iteration
break statement stops the loop, and continue skips the current iteration
B.
continue statement stops the loop, and break skips the current iteration
continue statement stops the loop, and break skips the current iteration
C.
Both break and continue stop the loop
Both break and continue stop the loop
D.
Both break and continue skip the current iteration
Both break and continue skip the current iteration
Question No# :
03
out of 13
<p>What is the output of the following code?</p><pre><span style="font-size: 14px;">console.log(2 == "2");<br></span><span style="font-size: 14px;">console.log(2 === "2");</span></pre>
<p>निम्नलिखित कोड का परिणाम क्या है?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">console.log(2 == "2");<br></span><span style="font-size: 14px;">console.log(2 === "2");</span></pre>
A.
true, false
true, false
B.
false, true
false, true
C.
true, true
true, true
D.
false, false
false, false
Question No# :
04
out of 13
Which loop is most appropriate when the number of iterations is known beforehand?
जब पुनरावृत्तियों की संख्या पहले से ज्ञात हो तो कौन सा लूप सबसे उपयुक्त है?
A.
for loop
for loop
B.
while loop
while loop
C.
do-while loop
do-while loop
D.
foreach loop
foreach loop
Question No# :
05
out of 13
<p>How many times will the following loop execute How many times will the following loop execute? </p><pre>for (let i = 0; i < 5; i++) <br>{ <br> console.log(i); <br>}</pre>
<p> निम्नलिखित लूप कितनी बार निष्पादित होगा</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">for (let i = 0; i < 5; i++) <br>{ <br> console.log(i); <br>}</pre>
A.
4
4
B.
5
5
C.
6
6
D.
Infinite
अनंत
Question No# :
06
out of 13
<p>What will be the output?</p><pre><span style="font-size: 14px;">for(i=1;i<=3;i++);<br></span><span style="font-size: 14px;">console.log(i);</span></pre>
<p>इसका परिणाम क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">for(i=1;i<=3;i++);<br></span><span style="font-size: 14px;">console.log(i);</span></pre>
A.
1 2 3
1 2 3
B.
3
3
C.
4
4
D.
Error
Error
Question No# :
07
out of 13
How to write an IF statement for executing some code if "i" is NOT equal to 5?
How to write an IF statement for executing some code if "i" is NOT equal to 5?
A.
if (i <> 5)
if (i <> 5)
B.
if (i != 5)
if (i != 5)
C.
if i =! 5 then
if i =! 5 then
D.
if i <> 5
if i <> 5
Question No# :
08
out of 13
<p>What will be the output?</p><pre><span style="font-size: 14px;">let x = 0;<br></span><span style="font-size: 14px;">if(x)<br></span><span style="font-size: 14px;"> console.log("True");<br></span><span style="font-size: 14px;">else<br></span><span style="font-size: 14px;"> console.log("False");</span></pre>
<p>इसका परिणाम क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">let x = 0;<br></span><span style="font-size: 14px;">if(x)<br></span><span style="font-size: 14px;"> console.log("True");<br></span><span style="font-size: 14px;">else<br></span><span style="font-size: 14px;"> console.log("False");</span></pre>
A.
True
True
B.
False
False
C.
0
0
D.
Error
Error
Question No# :
09
out of 13
How to write an IF statement in JavaScript?
How to write an IF statement in JavaScript?
A.
if (i == 5)
if (i == 5)
B.
if i == 5 then
if i == 5 then
C.
if i = 5
if i = 5
D.
if i = 5 then
if i = 5 then
Question No# :
10
out of 13
<p>What will be the output of the following JavaScript code?</p><pre><span style="font-size: 14px;">let i = 0;<br></span><span style="font-size: 14px;">while(i < 3) {<br></span><span style="font-size: 14px;"> console.log(i);<br></span><span style="font-size: 14px;"> i++;<br></span><span style="font-size: 14px;">}</span></pre>
<p>निम्नलिखित जावास्क्रिप्ट कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">let i = 0;<br></span><span style="font-size: 14px;">while(i < 3) {<br></span><span style="font-size: 14px;"> console.log(i);<br></span><span style="font-size: 14px;"> i++;<br></span><span style="font-size: 14px;">}</span></pre>
A.
0 1 2
0 1 2
B.
1 2 3
1 2 3
C.
0 1 2 3
0 1 2 3
D.
1 2
1 2
Question No# :
11
out of 13
Which loop is guaranteed to execute at least one time, regardless of the condition?
स्थिति की परवाह किए बिना, किस लूप को कम से कम एक बार निष्पादित करने की गारंटी है?
A.
for loop
for loop
B.
while loop
while loop
C.
do-while loop
do-while loop
D.
None of the above
None of the above
Question No# :
12
out of 13
<p>What is the output?</p><pre><span style="font-size: 14px;">let x=10;<br></span><span style="font-size: 14px;">if(x="5")<br></span><span style="font-size: 14px;"> console.log("Yes");</span></pre>
<p>इसका परिणाम क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">let x=10;<br></span><span style="font-size: 14px;">if(x="5")<br></span><span style="font-size: 14px;"> console.log("Yes");</span></pre>
A.
No Output
No Output
B.
Yes
Yes
C.
Error
Error
D.
Undefined
Undefined
Question No# :
13
out of 13
What is the correct syntax for a for loop?
फॉर लूप के लिए सही सिंटैक्स क्या है?
A.
for (i = 0; i < 5; i++) { // code }
for (i = 0; i < 5; i++) { // code }
B.
for (i <= 5; i++) { // code }
for (i <= 5; i++) { // code }
C.
for i = 1 to 5 { // code }
for i = 1 to 5 { // code }
D.
for (i = 0; i < 5) { // code }
for (i = 0; i < 5) { // code }
Online Exam Quiz for One day Exam
Online Typing Test
CCC Online Test 2026
Best Computer Training Institute in Prayagraj (Allahabad)
Best Java Training Institute in Prayagraj (Allahabad)
Best Python Training Institute in Prayagraj (Allahabad)
O Level Online Test in Hindi
Best Website and Software Company in Allahabad