Skip to content

Commit fc00d03

Browse files
committed
Finished Challenge 6 in arrays.js
1 parent f71a9af commit fc00d03

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

assignments/arrays.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ console.log(`There are ${oldCars.length} cars made before the year 2000`);
106106
// ==== Challenge 6 ====
107107
// A buyer is interested in seeing only BMW and Audi cars within the inventory. Return an array that only contains BMW and Audi cars. Once you have populated the BMWAndAudi array, use JSON.stringify() to show the results of the array in the console.
108108
let BMWAndAudi = [];
109-
110-
console.log();
109+
BMWAndAudi = inventory.filter(car => (car.car_make.includes("BMW") || car.car_make.includes ("Audi")))
110+
console.log(JSON.stringify(BMWAndAudi));
111111

112112

113113

0 commit comments

Comments
 (0)