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
You can do easily using ES6 template string and transpile to ES5 using any available transpilar like babel.
template string
const age = 3; console.log(`I'm ${age} years old!`);
http://www.es6fiddle.net/im3c3euc/