Constructor


#1

hello, here is my code
var object1= new Object();
  object1.name="XYZ";
  object.age=23;
var object2= new Object();
  object2.name="abc";
  object2.age=42;
var object3= new Object();
  object3.name="cvb";
  object3.age=67;
  What is the error?

Replace this line with your code.


#2

var object1= new Object();
object1.name="XYZ";
object.age=23;

You probably meant object1.age, but wrote object.age on line 3.


#3

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