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 9
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# :
02
out of 9
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# :
03
out of 9
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# :
04
out of 9
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 }
Question No# :
05
out of 9
<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# :
06
out of 9
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# :
07
out of 9
<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# :
08
out of 9
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# :
09
out of 9
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
Latest Current Affairs 2025
Online Exam Quiz for One day Exam
Online Typing Test
CCC Online Test 2025
Python Programming Tutorials
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
Bank SSC Railway TET UPTET Question Bank
career counselling in allahabad
Sarkari Naukari Notification
Best Website and Software Company in Allahabad
Sarkari Exam Quiz