Skip to content

Commit a54d3ef

Browse files
committed
Challenge 2 Completed
-array.js
1 parent adbfa4a commit a54d3ef

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
@@ -69,8 +69,8 @@ console.log("Car 33 is a " +inventory[33]['car_year'] + " " +inventory[33]['car_
6969

7070
// ==== Challenge 2 ====
7171
// The dealer needs the information on the last car in their inventory. What is the make and model of the last car in the inventory? Log the make and model into the console.
72-
let lastCar = 0;
73-
console.log();
72+
let lastCar = inventory[inventory.length-1];
73+
console.log(lastCar['car_make'], lastCar['car_model']);
7474

7575
// ==== Challenge 3 ====
7676
// The marketing team wants the car models listed alphabetically on the website. Sort all the car model names into alphabetical order and log the results in the console

0 commit comments

Comments
 (0)