运行 ❯
获取您
自己
的网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 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>