Lesson 11: Creating a new object


#1

I don't know what is wrong with this code?

var myOwnObject = new Object();

myOwnObject.age = 16;
myOwnObject.name = "Blake";

Oops, try again. Make sure to set your age key to a number representing your age, like this: age: 26


#2

@flake99,
Could you please provide a link to the section......
are you creating a variable with a variable-name as asked in the Instructions....


#3

Here is the link to the section: https://www.codecademy.com/courses/javascript-beginner-en-9Sgpi/2/3?curriculum_id=506324b3a7dffd00020bf661

and the instructions

Recreate your me object in the editor, but this time, use the object constructor. Once you make it, use either the [] notation or the . notation to give it a name property with a string value (your name) and an age property with a number value (your age).


#5

@flake99
The Instuction clearly require's you use the me variable
You clearly use the construct notation so that's Ok.

You could add

console.log( "You are " + (me.age) + " years old" + " and your name is " + me.name + ".");