JavaScript Conditional Statements
JavaScript Conditional Statements - Important Points
| 16. | Which of the following is a logical operator in JavaScript? |
|---|
A. &&
B. ||
C. !
D. All of the above
View Answer Discuss Work SpaceAnswer: option d
Explanation:
| 17. | What is the output of the following code? var x = 10; |
|---|
A. x is equal to y
B. x is not equal to y
C. undefined
D. Error
View Answer Discuss Work SpaceAnswer: option a
Explanation:
| 18. | What is the output of the following code? var x = 10; |
|---|
A. x is equal to y
B. x is not equal to y
C. undefined
D. Error
View Answer Discuss Work SpaceAnswer: option b
Explanation:
| 19. | What is the output of the following code? var x = 10; |
|---|
A. x is greater than y
B. y is greater than x
C. undefined
D. Error
View Answer Discuss Work SpaceAnswer: option b
Explanation:
| 20. | Which of the following is not a valid way to declare a variable in JavaScript? |
|---|
A. var x;
B. let x;
C. const x;
D. int x;
View Answer Discuss Work SpaceAnswer: option d
Explanation: