Q. What will be the output of the following code snippet?
Code:var a = true + true + true * 3; print(a)
Dear candidates you will find MCQ questions of JavaScript here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question
var a = true + true + true * 3; print(a)
The correct answer is both (A) var and (D) const.
But since only one option is usually expected, (A) var is the traditional and direct answer.
Explanation:
var a = 'mcq'; var b = 'buddy'; var c = a/b; document.write(c);
var a = '10'; var b = a = 20; document.write(a+b);
var a = 10; var b = 0; document.write(a/b);