Report Bug

Qus

What will be the output of the following JavaScript snippet?

console.log("5" + 3);
Qus

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

console.log("5" + 3);


A. 53
B. 8
C. 2
D. Error


Solution
A. 53



Explanation
<p><span style="font-size: 14px;">"5" is a string.</span></p><p><span style="font-size: 14px;">3 is a number.</span></p><p><span style="font-size: 14px;">When the + operator is used with a string, JavaScript performs string concatenation instead of numeric addition.</span></p><p><span style="font-size: 14px;">The number 3 is automatically converted to the string "3".</span></p>
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad