Learn Basic JavaScript by Building a Role Playing Game - Step 82

step 82
I’m having trouble understanding this. I’m a bit confused on when an object has 2 names like “claw hammer” does it become a string as opposed to when we’re declaring a name in an object. Also the terminal says Your third weapons object should have the name set to claw hammer and the power set to 50 . I’m having trouble figuring this out.
const weapons = [{
name:“stick”,
power:5
},
{
name:“dagger”,
power:30
},
{
name:“claw hammer”,
“claw hammer”:50
},
{
name:“sword”,
sword:100
}

];

my bad found the solution. Need to read the instructions properly. Instead of “claw hammer” I needed to make the second elements of the objects all power.

solution:
const weapons = [{
name:“stick”,
power:5
},
{
name:“dagger”,
power:30
},
{
name:“claw hammer”,
power:50
},
{
name:“sword”,
power:100
}

];

1 Like

solution***
const weapons = [
{name: “stick”, power:5},
{name: “dagger”, Power:30},
{name: “claw hammer”, power: 50},
{name: “sword”, power: 100}
];