- 1

What will the code below output to the console and why?

const carOne = { color: 'blue', status: { running: true, passengers: 4, wiperFluid: 'empty' }, age: 5, miles: 50000, value: '8000' } const carTwo = { color: 'green', status: { running: 'yes', passengers: 2, fuelTank: 'empty' }, value: 9000 } const combinedCar = { ...carOne, ...carTwo } console.log(combinedCar);

23rd Jun 2022, 7:55 AM
Rakib khan
Rakib khan - avatar
1 Respuesta
+ 2
Md. Rakibul Islam 183-15-2264 What do you thing? data will be combined to new object and 1st object value will be override by 2nd object value
23rd Jun 2022, 8:14 AM
A͢J
A͢J - avatar