Skip to content

Commit 7b5d447

Browse files
sofialevinsofialevin
authored andcommitted
Completed Challenge 2 in arrays.js file.
1 parent a6061b8 commit 7b5d447

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

assignments/arrays.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ console.log(`Car 33 is a *car year goes here* *car make goes here* *car model go
6868
// ==== Challenge 2 ====
6969
// 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.
7070
let lastCar = 0;
71-
console.log();
71+
lastCar = inventory.pop();
72+
console.log(lastCar.car_make + ' ' + lastCar.car_model);
7273

7374
// ==== Challenge 3 ====
7475
// 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)