reorganizing
This commit is contained in:
Executable
+45
@@ -0,0 +1,45 @@
|
||||
for (let name of names) {
|
||||
console.log(name);
|
||||
}
|
||||
|
||||
let car = {
|
||||
model: "Golf",
|
||||
make: "Volkswagen",
|
||||
year: 1999,
|
||||
color: "black",
|
||||
};
|
||||
|
||||
for (let prop in car) {
|
||||
console.log(car[prop]);
|
||||
}
|
||||
|
||||
for (let prop in car) {
|
||||
console.log(prop);
|
||||
}
|
||||
|
||||
let cars = [
|
||||
{
|
||||
model: "Golf",
|
||||
make: "Volkswagen",
|
||||
year: 1999,
|
||||
color: "black",
|
||||
},
|
||||
{
|
||||
model: "Picanto",
|
||||
make: "Kia",
|
||||
year: 2020,
|
||||
color: "red",
|
||||
},
|
||||
{
|
||||
model: "Peugeot",
|
||||
make: "208",
|
||||
year: 2021,
|
||||
color: "black",
|
||||
},
|
||||
{
|
||||
model: "Fiat",
|
||||
make: "Punto",
|
||||
year: 2020,
|
||||
color: "black",
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user