Exercise 6 ' Remove whitespace '


#1

Hello Community,

I had trouble passing the second question of Exercise 6 and after multiple attempts accepted to “Get code”, but it did not reveal the answer. Anyway, my various attempts are listed below. What have a I done wrong and what is the correct code?

Thanks.

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 ‘.toTrim());
console.log(’ Remove whitespace ‘.trim());
console.log(’ Remove whitespace ‘.trim());
console.log(’ Remove whitespace ‘.trim(‘Remove whitespace’));
console.log(’ Remove whitespace ‘.toTrim());
console.log(’ Remove whitespace’.trim());


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.