var car1 speed 150 weight 2000 show function for var cur in this conso

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
var car1 = {
speed: 150,
weight: 2000,
show: function() {
for (var cur in this) {
console.log (this[cur]);
};
}
};
var car2 = {
speed: 160,
weight: 1500,
show: function() {
for (var cur in this) {
console.log (this[cur]);
};
}
};
console.log (car1);
car1.show();
console.log (car2);
car2.show();