Codington
0 of 6 problems solved • 0%
Use in a course

Exercise prompt

Log a Calculated Value

console.log() can receive more than one value. Separate its arguments with a comma and the console displays them together with a space between them.

Example

console.log("Level:", 3);

The string and number are two separate arguments. The comma separates them in the code, and the console places a space between their displayed values.

Your task

Use one console.log() call to display Total: 12. Pass the text label and the expression 8 + 4 as separate arguments so JavaScript calculates the number.