Creating a new object


#1

Arrays and Objects in JS

i keep geeting error in my code

var meObj = {};
var meObj = new object();
meObj.name = "vishal";
meObj.age =  22;

#2

Use one or the other, but not both.

should be, new Object();


#3

thanku mtf
i correct my error but know i am getting error
""Make sure to give the me object a key called name.""
corrected code is this
var meObj = new Object();
meObj.name = "vishal";
meObj.age = 22;


#4

This suggests to me the variable name should be me

me.name = "Wee Gillis";

#5

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