Skip to content

Printing text and numbers

Read · 1 of 5

Three ways to combine

Commas: console.log("Score:", 42) prints both with a space between: Score: 42.

+ joins text with no space added. Backticks make a template: ` 7 + 3 = ${7 + 3} puts the result of the maths where ${…}` is.