Does if statement...buggy


#1

Block Scope II 5/7
https://www.codecademy.com/courses/learn-javascript-scope/lessons/scope/exercises/block-scope-ii?action=lesson_resume&program_content_id=750b9caf77e776ea09c61f3d0a90d7f8&program_id=321228771b43979da738629d50d0e049

I thought I had this right but it kept telling me “Does the ‘if’ statement check if region is equal to ‘The Arctic’?”. Eventually I just let it give me the code and I’m still getting the error. I pushed the report a bug button but nothing happens…maybe it’s a silent alarm? At any rate, how do I move forward?



const visibleLightWaves = () => {
  let lightWaves = "Moonlight";
  let region = "The Arctic";
    if (region === "The Arctic") {
      let lightWaves = "Northern Lights";
      console.log(lightWaves);  
    }
  console.log(lightWaves);
};

visibleLightWaves();



#2

here:

 if (region === "The Arctic") 

the string needs to be enclosed in apostrophes ('), quotation marks (") doesn’t seem to be allowed


#3

So last time I had a problem they told me the single quotes was the problem. And this is actually the code that showed up when I finally gave up and hit "get code’.


#4

Just use what the instructions use, in this case apostrophes


#5

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