Exercise 3.4
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
const myCar = {
|
||||
make: "Toyota",
|
||||
model: "Camry",
|
||||
tires: 4,
|
||||
doors: 4,
|
||||
color: "blue",
|
||||
forSale: false
|
||||
};
|
||||
|
||||
let propColor = "color";
|
||||
myCar[propColor] = "red";
|
||||
propColor = "forSale";
|
||||
myCar[propColor] = true;
|
||||
console.log(myCar.make + " " + myCar.model);
|
||||
console.log(myCar.forSale);
|
||||
Reference in New Issue
Block a user