Possible bug in the system?


#1

var slaying = true;
var youHit = Math.floor(Math.random() * 2);
var damageThisRound = Math.floor(Math.random() * 5 + 1);
var totalDamage = 0;

Here is the code.

Oops, try again. Make sure you capitalize Math in Math.floor() and Math.random()!

here is the error.

This is from learn javscript, dragon slayer.

I litteraly copied and pasted this code from the original code provided. I also ran this exact same code in the next secton of the course and it worked. (Note that the section which gave me this error was only section 2, declare your variables.)

So I have come to a conclusion that section 2 may have a bug in it?

Also note that I tried this on 2 serperate computers, on 2 seperate ip addresses. So I don't think it is just this computer.

Also note that I already tried reseting the code, and copying and pasting again.

Also note that this topic is similar to another topic about this problem that other people also had. But that topic didn't recieve too many responses. So try try again right?


#2

So weird... Your code works for me. I have no idea why it's doing that.


#3

did you try it in section 2 of javascript dragon slayer, declaring variables?

Because this exact code worked for me aswell...but not in section 2 for some odd reason.


#4

yes, in section 2, sorry it's not working


#5

Only in section two? Odd, I did this lesson a few months ago, didn't finish the course though. You could try running it in a different browser, yes, codecademy has been quite buggy since the update.


#6

One day i tried it again and it magically worked, inconsistent but worked


#7

Sorry that happened... I think that things are just getting updated right now, so it's probably just buggy in general. Glad you can move on now! I know it sucks to be stuck. JS is a good course too.


#8

yes weight off my shoulders