0
uncaught typeError: Person is not a constructor
problem this code:var p1 = new person("John", 42 ,"green"); var person={ name:"John", age:42 , favColor:"green"}; function person(name, age, color){ this.name=name; this.age=age; this.favColor=color; } var p1 = new person("John", 42 ,"green"); var p2=new person("Amy",21,"red") document.write(p1.age); document.write(p2.name);
1 Respuesta
+ 6
Try the same code but only from the "function" part