Reference Error


#1


var me=new object();
{
me.name="trinkush";
me.age=22;
};


#2

you seem to confuse two ways to create objects, if you use the object constructor:

var me=new object();

you should add property's like this:

me.age = 22

you seem to confuse the object literal notation:

var myObj = {
    type: 'fancy',
    disposition: 'sunny'
};

var emptyObj = {};

and the object constructor:

var myObj = new Object();
myObj.test = "hello"

don't mix them


#3

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