File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ console.log(`${lastCar.car_year} ${lastCar.car_make} ${lastCar.car_model}`);
7777let carModels = [ ] ;
7878let index = 0 ;
7979inventory . forEach ( function ( element ) {
80- carModels . push ( inventory [ index ] . car_model ) ;
80+ carModels . push ( ` ${ inventory [ index ] . car_model } ` ) ;
8181 index ++ ;
8282} ) ;
8383console . log ( carModels . sort ( ) ) ;
@@ -87,7 +87,7 @@ console.log(carModels.sort());
8787let carYears = [ ] ;
8888index = 0 ;
8989inventory . forEach ( function ( element ) {
90- carYears . push ( inventory [ index ] . car_year ) ;
90+ carYears . push ( ` ${ inventory [ index ] . car_year } ` ) ;
9191 index ++ ;
9292} ) ;
9393console . log ( carYears ) ;
@@ -98,7 +98,7 @@ let oldCars =[];
9898index = 0 ;
9999carYears . forEach ( function ( element ) {
100100 if ( element > 2000 ) {
101- oldCars . push ( carYears [ index ] ) ;
101+ oldCars . push ( ` ${ carYears [ index ] } ` ) ;
102102 }
103103} ) ;
104104console . log ( oldCars . length ) ;
@@ -109,9 +109,7 @@ let BMWAndAudi =[];
109109index = 0 ;
110110inventory . forEach ( function ( element ) {
111111 if ( Object . values ( element ) . includes ( "BMW" ) || Object . values ( element ) . includes ( "Audi" ) ) {
112- BMWAndAudi . push ( inventory [ index ] . car_year ) ;
113- BMWAndAudi . push ( inventory [ index ] . car_make ) ;
114- BMWAndAudi . push ( inventory [ index ] . car_model ) ;
112+ BMWAndAudi . push ( `${ inventory [ index ] . car_year } ${ inventory [ index ] . car_make } ${ inventory [ index ] . car_model } ` ) ;
115113 }
116114 index ++ ;
117115} ) ;
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ const antonietta = {
5252 "gender" : "F" ,
5353 multiplyNums ( x , y ) {
5454 return x * y ;
55- }
55+ } ,
5656} ;
5757
5858// ==== Challenge 2: Reading Object Data ====
You can’t perform that action at this time.
0 commit comments