运行 ❯
获取您的
自己的
网站
×
更改方向
保存代码
更改主题,暗/亮
前往 Spaces
<!DOCTYPE html> <html> <body> <script> const myVehicle = { brand: 'Ford', model: 'Mustang', color: 'red' } const updateMyVehicle = { type: 'car', year: 2021, color: 'yellow' } const myUpdatedVehicle = {...myVehicle, ...updateMyVehicle} // Check the result object in the console: console.log(myUpdatedVehicle); </script> <p>Press F12 and see the result object in the console view.</p> </body> </html>