Strings

String Length

String Length

length tells you how many characters a string contains. Spaces count because they are characters too.

Your task: Create headlineLength from the provided headline, then log the number.

Prerequisites

  • variables
  • strings

Tests

  • headlineLength stores the number of characters
  • the character count is logged
  • the count comes from the string length property
Loading...
Console

Run code to see output.