Magic Eight Ball (with else if)

I tried to solve the task https://www.codecademy.com/courses/introduction-to-javascript/projects/magic-eight-ball-1 with else and else if, but it shows me a syntax error. Where did I make a mistake?

let userName = '';
userName ? console.log('Hello, '+userName+'!') : console.log('Hello!');
const userQuestion = 'Will I become a werewolf tonight?';
console.log(userName + ' Will I become a werewolf tonight?')
let randomNumber = Math.floor(Math.random() * 8);
let eightBall = '';
if (randomNubmer = 0) {
  eightBall = 'It is certain';
}
else if (randomNubmer === 1) {
  eightBall = 'It is decidedly so';
}
else if (randomNubmer === 2) {
  eightBall = 'Reply hazy try again';
}
else if (randomNubmer === 3) {
  eightBall = 'Cannot predict now';
}
else if (randomNubmer === 4) {
  eightBall = 'Do not count on it';
}
else if (randomNubmer === 5) {
  eightBall = 'My sources say no';
}
else if (randomNubmer === 6) {
  eightBall = 'Outlook not so good';
}
else (randomNubmer === 7) { 
eightBall = 'Signs point to yes';
}

else can’t have a condition, else is everything else

2 Likes