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

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;

The count is 5.

Your task

How many characters are in code camp? Replace the prediction, read .length into characterCount, then add an Actual: line so you can compare.

Hint

Spaces count toward a string’s length.