WorksheetsJavaScript Basics
Total questions: 10
Worksheet time: 4mins
Which is the right way to make a for loop?
Alienisation, The End, Rebels
Installation, Ending, Timer
Intialisation, End Condition, Counter
Initialisation, Counter, End Condition
A loop that executes for a pre-defined number of times
(a)
A loop that executes until a condition is met is called
(a)
Which of the below are types of loops
if then else
while loop
for loop
Nested loops are
Multiple independent loops
Conditions in a loop
Loop in a Loop
Loop in a condition
for ( var i = 0; i < 50; i++ )
How many times will this loop execute
51 times
49 times
50 times
0 times
Which of the iterations runs 25 times
for ( var i = 2; i < 26; i ++ )
for ( var i = 0; i < 25; i ++ )
for ( var i = -1 ; i > 25 ; i -- )
for ( var i = 0; i <= 25; i --)
One of the below functions lets you climb 1000 feet
for ( var count = 0; count > 999; count --)
moveUpOneFoot();
}
for ( var count = 2; count <= 1001; count ++)
moveUpOneFoot();
}
for ( var count = 1000; count < 1; count --)
moveUpOneFoot();
}
for ( var count = 0; count < 1000; count ++)
moveUpOneFoot();
}
Declare a variable called Number and assign it the value: "TwentyFive"
(a)
How do you define a function in JavaScript
function = climbUp();
fun = "climbUp";
function climbUp();
fun = (climbUp());
