Intro to JavaScript 5 Built-in Methods- Remove Whitespace


#1

// 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?


#2

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

I’m guessing it must be this one…

https://www.codecademy.com/courses/learn-javascript-introduction/lessons/introduction-to-javascript/exercises/built-in-methods?course_redirect=introduction-to-javascript

console.log('    Remove whitespace   '); 

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