Built in Methods - ' Whitespace '


#1

Hi, I am confused with the built in methods section. What is the ‘whitespace’, am I missing something or does the text look the exact same before and after i enter the .trim method?

Thank you


#2

look at this bin:

http://jsbin.com/jekelubafi/edit?js,console

i don’t hope they look the same (press run in the top right corner)


#3

Thank you very much, this makes sense now - but makes me wonder why you wouldn’t just enter the string already trimmed. Maybe this will make sense eventually!


#4

codecademy mostly teaches concepts, it makes sense if you get user input or other cases where trim comes in handy

For example, included an awful lot of whitespace above this line, let me show you:

the forum is removing it to improve readability. Which can be a very good thing.


#5

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