Create a Basic JavaScript Object

Not sure what’s wrong here, but the test says numlegs isn’t a number…

let dog = {
name: “Buddy”,
numlegs: 4
};


let dog = {
 name: "Buddy",
 numlegs: 4 
};

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/object-oriented-programming/create-a-basic-javascript-object

Buddy has curly quotes like it was copied from word or somewhere else. Retype the quotes.

You need to use the correct camel case for numlegs.

It was copied directly from the test editor, but will try again - Thanks.

This worked- Thank you! I know it’s best practice but shouldn’t I be able to spell that anyway I wanted?

Not for the tests but in real life yep. :smiley:

1 Like