Consider this code:
var age = 3; console.log(\"I\'m \" + age + \" years old!\");
Are there any other ways to insert the value of a variabl
Try kiwi, a light-weight JavaScript module for string interpolation.
You can do
Kiwi.compose("I'm % years old!", [age]);
or
Kiwi.compose("I'm %{age} years old!", {"age" : age});