This section covers the questions for JavaScript Operators to clear all your concepts.
Question 1
What will be the result of the following operation?
console.log(5 % 2);
1
2
0
5
Question 5
Which of the following operators is used to assign a value to a variable?
==
===
=
:=
Question 6
What is the purpose of the nullish coalescing operator (??)?
To return true if both operands are null
To provide a default value when the left-hand side is null or undefined
To perform logical AND operations
To compare values strictly
Question 7
Ternary operator is the best alternative of which aspect of Javascript?
If-else
For loop
While loop
do-while loop
Question 8
What is the output of this ternary operation?
const value = 10;
console.log(value > 5 ? "Yes" : "No");
Yes
No
Error
Undefined
Question 10
What will the following code log?
console.log(5 == "5");
true
false
undefined
Error
There are 10 questions to complete.