Intro to JavaScript 5 Built-in Methods- Remove Whitespace

// Use a string method to log the following statement without whitespace at the beginning and end of it.
console.log(‘Remove whitespace’.trim());

What am I doing wrong here?

Which exercise is this question relating to? Please post a link. Thanks.

I’m guessing it must be this one…

console.log('    Remove whitespace   '); 

Be sure to leave the whitespace in the string literal when you chain on the method.

1 Like