Stuck becoming a werewolf


#1
let moonPhase = 'full';

if(moonPhase === `full`){
    console.log(`Howl!`);
}else if(moonPhase === `mostly full`);{
    console.log(`Arms and legs are getting hairier`);
} else if (moonPhase === `mostly new`);{
  console.log(`Back on two feet`);
} else {
    console.log(`Invalid moon phase`);
}

I keep getting an else error please don’t give me the answer just a hint why would it say else if error I thought I posted it properly. I keep getting this error when ran. I wonder what the error means too.
/home/ccuser/workspace/learn-javascript-U2L1E5-8/main.js:5
else if(moonPhase === mostly full);{
^^^^
SyntaxError: Unexpected token else
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)


#2

Adding semi-colon on the wrong places can give syntax errors.


#3

thank you my friend I appreciate the help !


#4

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