<html>
<body>
<h1>JavaScript 语句</h1>
<h2>const 语句</h2>
<p>声明一个常量对象不会使属性不可更改:</p>
<p id="demo"></p>
<script>
// 创建对象:
const car = {type:"Porsche", model:"911", color:"white"};
// 更改属性:
car.color = "red";
// 添加属性:
car.owner = "Bill";
// 显示属性:
document.getElementById("demo").innerHTML = "Car owner is " + car.owner;
</script>
</body>
</html>