<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>funciton</title>
</head>
<body>
<script>
var obj={
a:1,
b:2,
c:3
}
Object.defineProperty(obj,"b",{
enumerable:false
})
// 忽略运算符enumerable:false
console.log(Object.leys(obj))//["a","c"]
console.log(Object.getOwnPropertyNames(obj))//["a","b","c"]
</script>
</body>
</html>