Working through day 1 of JavaScript. No previous experience. 1st post so hopefully I can figure out how to best post the problem I have in the correct location.
The tutorial shows:
2.
In the second console.log() statement in app.js , we have a string ' Remove whitespace ' which has spaces before and after the words 'Remove whitespace' .
If we browse the JavaScript string documentation, we find several built-in string methods that each accomplish a different goal. The one method that seems ideal for us is .trim() .
Use the method to remove the whitespace at the beginning and end of the string in the second console.log() statement.
I don’t see ' Remove whitespace ' in the tutorial code. Here’s a snapshot of what is showing on my screen:
In the second console.log() statement in app.js , we have a string ' Remove whitespace ' which has spaces before and after the words 'Remove whitespace' .
The words Remove whitespace do not exist. The tutorial says they do but they don’t appear on my screen. Maybe this is a bug or typo?
Ok, so I can just make up a string since they one they reference does not exist? Do you think doing this will allow me to continue progress in my lesson or is the answer the website provides the “only” right answer?
If it’s the only right answer you will be able to click “see solution” or something.
It’s not a terrible idea to do that if you’re stuck for too long.
(In this case the difference would be trivial at best, but sometimes certain situations call for very precise following of algorithms).