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 ▸

How to check if value exists in an object in JavaScript?


Make button that says how many times it has been clicked.


What is the difference between global and local variables?


How would you change the background colour of a div with the id "colourme" to purple?