Javascript Condition & loop
/20
0
:
0
Submit
Total 20 question (100 marks)
1. Which is the option below is correct to use WHILE loop?
2. Which is the correct command help to check "i" variable is not equal 5?
3. What is the result of the below code? var i = 2; var count = 0; for (; i < 6;
4. Select the correct IF condition below of Javascript.
5. Select output of below block code var i = 0; while (i < 0) { console.log("hi"); }
6. How to insert a multi-line comment in JavaScript?
7. Select the correct option when While loop bellow is finished? var i = 2 ; while (i <= 10) {
8. What is the result of "variable"? var variable; if (""){ variable = true; } else { variable = 55; }
9. What is the correct output of the below block code? if ("") { console.log("program more"); } else if ("cool") { console.log("party hard!"); }
10. What is the result of the block code below? var numbers = [2, 4, 6, 8]; var counter = 0; var
11. What is the "count" value? var count = 0; for(var i = 0; i < 10; i++){ ++count; if(i ==
12. What is the result of the below code? while (i < 5) { i++; if (i == 3) {
13. What is the value of x after finish below command? var x = 4 ; for (i = 0; i
14. What is the output of the IF/ELSE command bellow? if (5 > 10) { console.log("Not so sure about this"); } else
15. What is the "variable" value? var variable; if ( true && 12 < 10 ){ variable = 12; } else { variable = 'chicken'; }
16. How many kinds of loops in Javascript?
17. Select the correct output of some code below: var age = 10; if(age > 5){ alert("1"); }else if(age < 20){ alert("2"); }
18. What loop bellow is the correct syntax?
19. What is the correct syntax to comments one line code in JavaScript?
20. What is the result of the below code? var n = 0; var x = 0; while (n < 3) {
Next
Previous