21. How many times will the following code print the word 'Hello'?
for(var i = 0; i <= 5; i++) {
console.log("Hello");
}
- 4
- 5
- 6
22. What will print out when the following code runs?
var i = 3;
var j = 5;
if(i == 3 && j < 5) {
console.log("Hello");
} else {
console.log("Goodbye");
}
- Hello
- Goodbye
- Nothing
23. What will print out when the following code runs?
var i = 7;
var j = 2;
if(i < 7 || j < 5) {
console.log("Hello");
} else {
console.log("Goodbye");
}
- Hello
- Goodbye
- Nothing
25. What does the operator symbol || represent in JavaScript?
- The logical OR operator
- The logical NOT operator
- The logical AND operator