Creating a new object


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

var myObj = new Object();
myObj["name"] = "Jesper";
myObj["age"] = "33";

// what am i doing wrong? thank you in advance.//


age value should be of type integer, not string


The age should be an int, not a string. Simply remove the quote marks around 33.


Thank you for your response, but it did not work. the problem remains the same after i removed the quote marks.


can we see an updated version of your code?

the object should be named me, you named the object myObj


Changing "myObj" to "me" solved my problem:

var me = new Object();
me["name"] = "Jesper";
me["age"] = 33;

Thank you very much for the help guys. Much appreciated. :slight_smile: