Codington
0 of 10 problems solved • 0%

Exercise prompt

Predict a String Length

Every string has a .length property. It counts all characters, including spaces and punctuation, and returns a number.

Example

const word = "hello"; const characterCount = word.length; console.log(characterCount); // outputs 5

Predict the output

A label contains two words separated by a space. Predict its character count.

const codeWord = "code camp"; console.log("Characters:", codeWord.length);
What will this code print?