1var myDog = {
2 name: "gozi",
3 legs: 4,
4 tails: 1,
5 friends: ["Ted", "Fred"]
6};
7
1var person = {
2 first_name : "Marty",
3 last_name : "Mcfly",
4 born : 1968,
5 died : 1933,
6 lovers: ["Jennifer Parker","Baines McFly"]
7};
1let object = {
2 'key1': 'value1',
3 'key2': 'value2',
4 'keyn': 'valuen',
5};
6console.log(object);
1person = {
2 'name':'john smith'
3 'age':41
4};
5
6console.log(person);
7//this will return [object Object]
8//use
9console.log(JSON.stringify(person));
10//instead
1let voleur = {
2 action : () =>console.log ('Coup de dague fatal') ,
3 crie : ('pour la horde!!!!') ,
4 coupfatal :()=> console.log ('coup dans le dos')
5
6}
7
8voleur.action() ;
9voleur.coupfatal() ;
10console.log(voleur.crie) ;
11