Issue with every lesson I've encountered so far past Scopes


#1

For some strange reason, in every lesson in and past Scopes, you’re not allowed to use double quotes when setting a variable.

Right inside the Scopes lesson, it tells you to set a value lightWaves to ‘Moonlight’. I did exactly just that, but with double quotes instead of single quotes. The lesson didn’t like it, and asked me if I even set the variable, even though I obviously had.

I know that people aren’t perfect, and the people who made these lessons might have been rushed, but isn’t there a bug report team to catch stuff like this?

Edit: I was incorrect about this, so majorly in fact, only because of the fact that I didn’t proceed to the next part of the lesson. When it tells me to set region to ‘The Arctic’, it allows double quotes.

I apologize for any major confusion I may have caused.

Edit 2: In the next part of the lesson, however, it asks you to say “if (region = ‘The Arctic’) {}” and that actually doesn’t allow double quotes.

Edit 3: Setting lightWaves to ‘Northern Lights’ in the if statement in the next step doesn’t allow double quotes either.


#2

If it’s against the rules to bump your own posts, then I’ll accept the punishments and promise not to do it again…

It’s been almost 24 hours since I asked this, and I’d appreciate an answer.


#3

Unfortunately we cannot speak for the course authors. They are many of them, each with their own test methods (SCT) and writing styles. It’s not uncommon to find that single quotes are needed for some exercises, and double for others. This is just a fact of life that we must learn to live with.

In JavaScript there are three different types of quoted strings…

'single quoted string'
"double quoted string"
`template string`

and for the most part they are all interchangeable. If the code permits const and let and arrow-functions then it will allow template strings, but this does not preclude how the author composed the test script.


#4

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