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

Exercise prompt

Trim Extra Spaces

The .trim() method returns a string without whitespace at its beginning or end. Spaces in the middle of the text stay in place.

Example

const rawTitle = " News "; const cleanTitle = rawTitle.trim();

cleanTitle becomes News.

Your task

The starter displays unwanted spaces because cleanName receives the raw value. Repair that assignment so the console displays Name: Mira.