代码示例:(标识:js_oper_in)
<!DOCTYPE html>
<html>
<body>

<h1>JavaScript 运算符</h1>

<h2>in 运算符</h2>

<p>"PI" 是 Math 对象的属性吗?</p>

<p id="demo"></p>

<script>
// 创建对象:
document.getElementById("demo").innerHTML = "PI" in Math;
</script>

</body>
</html>
运行结果: