0
Array Of personne
I want to create array of personne which contain name and age of every personne for example person[0]['age'] = 34
4 Réponses
+ 7
congratulation for your level 11
+ 2
var Person = function(name, age) {
this.name=name;
this.age=age;
}
var persons = [];
persons.push(new Person('john',34));
persons.push(new Person('jane',25));
+ 1
var person = [{name:'john', age:34}, {name:'jane', age:25}];
0
Thank you Said :)