- 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);
1 Resposta
+ 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