Werewolf.js 2


#1


https://www.codecademy.com/courses/learn-javascript/lessons/control-flow/exercises/else-if?action=lesson_resume


It won't tell me what is wrong with my coding and I can't go forward past this section.


var moonPhase = 'solar eclipse';

if (moonPhase === 'full') {
  console.log('Howwwlll!!');
} 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');
}


#2

You're supposed to have 4 Ws in howl.


#3

Thank you, but I added the fourth "w" and it still won't let me move on.


#4

@tekkie1618 I have tried everything. Any other ideas?


#5

Try deleting all the semicolons exeprt the last one so it should be like this:
if (...) {
...}
else if () {}
else {};

if that doesn't work then try re-reading the instructions carefully


#6

var moonPhase = 'full';
moonPhase = 'mostly full';
moonPhase = 'mostly new';
moonPhase = 'solar eclipse';
if (moonPhase === 'full') {
console.log('Howwwwlll!!');
} else if (moonPhase === 'mostly full') {
console.log('Arms and legs are getting hairy');
} else if (moonPhase === 'mostly new') {
console.log('Back on two feet');
} else {
console.log('Invalid moon phase');
}

This is what I have and it wont let me move on. I also had a different setup with the same information and it wouldn't let me move on. @hazemtn


#7

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