Domanda di colloquio di Visa Inc.

What will this code output? console.log("122" + 344)

Risposta di colloquio

Anonimo

9 dic 2017

The second operand is coerced into the type of the first operand in JS. So in this case, since the first operand is a string, the second one becomes a string. So "122" + "344" --> 122344

2