Report Bug

Qus

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

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

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

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


A. 0
B. 3
C. error
D. 5


Solution
D. 5



Explanation
<p>hear true is treated as 1 so that 1+1+1*3 =5</p><p><br></p>
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