Role playing game step 109

Hello,

Can anyone see what the error is this array is please (step 109, role-playing game JS)?

The ‘name’ is struck out and faded out respectively in the second and third objects, but I’m not sure why as the property can be repeated in other objects?

const monsters = [{
  name: "slime",
  level: 2,
  health: 15
},
  name: "fanged beast",
  level: 8,
  health: 60
},
  name: "dragon",
  level: 20,
  health: 300
},
];

Please include link to the step in question.

I am unable to link it through the help option as it was not available, but I will post it here separately:

Step 109

Now you can start the code to fight monsters. To keep your code organized, your fightDragon function has been moved for you to be near the other fight functions.

Below your weapons array, define a monsters variable and assign it an array. Set that array to have three objects, each with a name, level, and health properties. The first object’s values should be slime, 2, and 15, in order. The second should be fanged beast, 8, and 60. The third should be dragon, 20, and 300.

you’re missing opening curly brackets before the 2nd and 3rd objects

1 Like

as Homer Simpson would say - “d’oh”. thank you

1 Like

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