What does the following code do and why? console.log(1+"2")

The code outputs the text "12" to the console, demonstrating a concatenation of a string and an integer.

TM

Related Javascript Mentoring answers

All answers ▸

What is the difference between global and local variables?


What is the difference between let and var when declaring variables in javascript?


How are objects created in arrays


What does the document.onload() function do and why is it useful?