Skip to content

Commit 039161b

Browse files
sofialevinsofialevin
authored andcommitted
Fixed mistake in Challenge 2.
1 parent 95462f8 commit 039161b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎assignments/arrays.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ for (let i = 0; i < inventory.length; i++) {
7373
// ==== Challenge 2 ====
7474
// 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.
7575
let lastCar = 0;
76-
lastCar = inventory.pop();
76+
lastCar = inventory[inventory.length - 1];
7777
console.log(lastCar.car_make + ' ' + lastCar.car_model + '.');
7878

7979
// ==== Challenge 3 ====

0 commit comments

Comments
 (0)