Learn Basic JavaScript by Building a Role Playing Game Step 80 FCC Bug?

Hello! So I am pretty sure my code is correct for this step, but when I do control + return, or click the button “Check Your Code” nothing happens. I have noticed through this whole project if my code is not correct and I click “Check Your Code” (or do control + return) nothing happens. It only changes if the answer is correct and then let’s me move on, which is weird but fine. However, I am pretty certain I am correct here. I couldn’t find anything on the forums about this step and after googling for a bit I came across this video where someone does exactly as I have done here, submits it, and freeCodeCamp accepts it as the correct answer. However, maybe I am just not seeing some small detail that’s throwing everything off?

Am I completely incorrect and my code is not even remotely close to the right answer? Because it appears to be exactly correct, I have checked many times. I thought maybe AdBlockPlus was throwing things off as fCC mentioned that may cause issues, and I disabled it on the entire website. Still no change though. Anyway here’s my code.

const weapons = [
  {
    name: "stick",
    power: 5
  },
  {
    name: "dagger",
    power: 30
  },
  {
    name: "claw hammer",
    power: 50
  },
  {
    name: "sword"
    power: 100
  }
];

here’s the video I found of someone doing exactly what I did and submitted it and fCC accepted it as correct. https://www.youtube.com/watch?v=lJWIb_UIHvM

So I must be making some mistake though right? My code is incorrect somehow but I’m just not seeing it. Can anyone point me in the right direction regarding what I am doing wrong?

Notably, maybe, there’s a squiggly red line appearing underneath power for sword indicating that it is spelled incorrectly even though it is not.

even i had the same problem , and when i progressed i learnt that , when some mistake or incompleted statements are made , it doesnt move on or even show what the error even is

Are you saying it won’t let you proceed to the following step even if you correct the mistake?

Notice that you are missing a comma after name: "sword"

1 Like

it has to be the correct format . when it has been corrected it automatically progressed

I knew I was overlooking some small detail! I had the comma in there before but scrolling with two fingers sometimes causes my browser to go back a webpage, but only on this website which is very odd. It must have been deleted in an accidental keystroke or an unintentional back page swipe. In any case that solved it, thank you!

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