Creating A New Object


var me = new me ( "xyz";
    me.age= 23;
**What is Wrong In This Code?**


i really recommend you to revisit some old exercises, to see how to create/define an object. This code contains several flaws.


Will you tell which exercises should I revisit?


the exercise you are at, oops, sorry

look at the instructions, there are two ways to create:

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


var myObj = new Object();
myObj["name"] = "Charlie"; = "Charlie";

your seems like a weird mixture between the two


var object1= new Object();"XYZ";

var object2= new Object();"abc";

var object3= new Object();"cvb";

Will you tell me what is wrong in this?


this line:


you misspelled object1

you currently have: object1, object2 and object3, but no object me (if you are still at the same exercise)


2 posts were split to a new topic: Creating a new object


whenyou determine var me you should use new Object. New Object is a determiner.
var me = new Object(); "ARCH";
me.age= 29;


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