Block Scope II

Is something wrong with the code?

I was asked to create an if statement, i leave the link here:

is about the instruction number 3, and here is my code:

const visibleLightWaves = () => {
  let lightWaves = 'Moonlight';
  let region = 'The Arctic';
  if (region === 'The Arctic');{}


look at the example:

if (dusk) {

do you see a semi-colon between ) and {? Placing a semi-colon where you did, will interrupt the if clause, preventing the if clause from ever executing, your if clause is also empty

1 Like

Ohhh, i didn’t notice it before, thanks!

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