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

1st Feb 2017, 9:16 PM
Omar Serrar
4 Réponses
+ 7
congratulation for your level 11
12th Jul 2017, 10:08 PM
Said BAHAOUARY
Said BAHAOUARY - avatar
+ 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));
2nd Feb 2017, 12:01 AM
visph
visph - avatar
+ 1
var person = [{name:'john', age:34}, {name:'jane', age:25}];
1st Feb 2017, 9:44 PM
Vasyl Mustyatsa
Vasyl Mustyatsa - avatar
0
Thank you Said :)
13th Jul 2017, 12:09 AM
Omar Serrar