<body> <script> // 1.属性的增强写法 const name = "蔡依林"; const age = "17"; const height = "162"; // ES5的增强写法 const obj = { name: name, age: age, height: height } console.log(obj); // ES6的增强写法 const obj2 = { name, age, height } console.log(obj2); // 2.函数增强写法 // ES5的函数增强写法 const Start = { song: function() { }, movie: function() { } } // ES6的函数增强写法 const Start = { song() { }, movie() { } } </script> </body>