Did you write 'mostly new' as a case 9/11


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-javascript-control-flow/lessons/control-flow/exercises/switch?action=lesson_resume&program_content_id=b50c0de2a7c212edf864f20546e5eac5&program_id=321228771b43979da738629d50d0e049

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
Gives me “Did you write ‘mostly new’ as a case?” in red but I really think I did. Also it wont’ give me the code even though I’ve tried running it a bunch of times.

```

let moonPhase = ‘full’;
switch (moonPhase) {
case ‘full’:
console.log(‘Howl!’);
break;
case ‘mostly full’:
console.log(‘Arms and legs are getting hairer’);
break;
case ‘mostly new’:
console.log(‘Back on two feet’);
break;
default:
console.log (‘invalid moon phase’);
break;
}

<do not remove the three backticks above>

#2

The problem is the smart quotes. Change them to standard ' or "


#3

Huh, works with "s. Thanks! Out of curiosity, why was it still able to evaluate my first statement? Out output was Howl! even though I was getting the message from CA.


#4

I really do not know anything about smart quotes being a Windows user. Smart quotes are a feature of Mac (I believe) and Linux (also believe). I know my Python IDE will not accept them, and repl.it does not support them either (in any language).

As far as the SCT is concerned, it usually uses pattern matching which does not include smart quotes.


#6

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