- A 10
- B 11
- C "10"
- D "11"
- Share this MCQ
Answer:
B
Share this MCQ
The ++
operator in JavaScript is an increment operator, which increments a number by 1.
In this case, the variable num
is initially assigned the value 10
, which is a number.
On the second line, num
is incremented by 1
using the ++
operator.
Therefore, num now has a value of 11
, and when it is logged to the console, the value 11
will be displayed.
Share this MCQ