NIELIT O Level Exam

<p>What will be the output of the following JS code snippet?</p><pre>var a = true + true + true * 3; print(a)</pre>

What will be the output of the following JS code snippet?

var a = true + true + true * 3;
print(a)


नीचे दिए गए JS कोड स्निपेट का आउटपुट क्या होगा?

var a = true + true + true * 3;
print(a)

A. 0

B. 3

C. error

D. 5




Correct Answer is :

D. 5



Explanation

hear true is treated as 1 so that 1+1+1*3 =5


Latest Current Affairs 2026 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad