NIELIT O Level Exam

<p>What will be the output of the following JavaScript snippet?</p><pre>console.log("5" + 3);</pre>

What will be the output of the following JavaScript snippet?

console.log("5" + 3);


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

console.log("5" + 3);

A. 53

B. 8

C. 2

D. Error




Correct Answer is :

A. 53



Explanation

"5" is a string.

3 is a number.

When the + operator is used with a string, JavaScript performs string concatenation instead of numeric addition.

The number 3 is automatically converted to the string "3".

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