运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> const vehicleOne = { brand: 'Ford', model: 'Mustang', type: 'car', year: 2021, color: 'red', registration: { city: 'Houston', state: 'Texas', country: 'USA' } } myVehicle(vehicleOne) function myVehicle({ model, registration: { state } }) { const message = 'My ' + model + ' is registered in ' + state + '.'; document.getElementById("demo").innerHTML = message; } </script> </body> </html>