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 could use Prototype's template system if you really feel like using a sledgehammer to crack a nut:
var template = new Template("I'm #{age} years old!"); alert(template.evaluate({age: 21}));