<!DOCTYPE html>标签:vue,console,log,Object,js,person,017,true,属性 From: https://blog.51cto.com/u_15356972/6085203
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
<script type="text/javascript">
Vue.config.productionTip= false;
let person = {
name:'张三',
sex: '男',
};
Object.defineProperty(person,'age',{
value:18,
enumerable : true, //属性可以被枚举
writable :true, //属性可编辑
configurable: true // 属性可删除
});
console.log(Object.keys(person));
console.log(person);
</script>
</body>
</html>