Magic Eight Ball

I can’t figure out what’s wrong with my code. I’ve looked at the video and I’m positive I did what he did, but when I run it I get an error message. Can someone point out where I went wrong?

Hello, @core0416180199, and welcome to the forums.

I ran your code, and received an error message as well. If you read the message closely, you should be able to see what is wrong:

ReferenceError: ranbomNumber is not defined

The error points to this line:

Where in your code have you defined a variable named ranbomNumber? :wink:

Didn’t I define it when I said let randomNumber = Math.floor(Math.random() * 8) ?

Well, let’s see:



Ok, so where did I go wrong? I’m a little confused…

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