Codington
0 of 8 problems solved • 0%

Exercise prompt

Compare Value Types

Quotation marks change a value's type. 42 is a number, while "42" is a string.

Example

console.log(typeof 10); // outputs "number" console.log(typeof "10"); // outputs "string"

Predict the output

Two score values look similar but were created differently. Predict the two type names in order.

const score = 7; const scoreText = "7"; console.log(typeof score, typeof scoreText);
What will this code print?