Possible Duplicate:
JavaScript equivalent to printf/string.format
Is there a more C like way to print complex strings in javascript, preferably one which doesn't require large numbers of the +
symbol and accompanying ""
?
I want this:
console.log ( "Name: %s Age: %s Sex %s Wieght %s Height %s", name, age, sex, weight, height );
Instead of this:
console.log ( "Name: " + name + " Age: " + age + " Sex: " + sex + " Weight: " + weight " Height: " + height );