Control flow 5/11 help!


Can someone help?

I’m pretty sure I got the code right but it gives me an error and I can’t progress.

this is the error:

} else }
SyntaxError: Unexpected token }
at createScript (vm.js:53:10)
at Object.runInThisContext (vm.js:95:10)
at Module._compile (module.js:543:28)
at Object.Module._extensions…js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:427:7)
at startup (bootstrap_node.js:151:9)

here’s my code:

let hungerLevel = 5;

if (hungerLevel > 7){
console.log(‘Time to eat!’);
} else }
console.log(‘We can eat later!’);



Hi @slinkyfran,

Do have a look of what comes after the else in your code.

You have one closing curly bracket } whereby it should be an opening curly bracket { instead.

Cheers :slight_smile:


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