demo.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script>
//instanceof 关键字
//语法: 对象 instanceof 构造函数
//判断该构造函数的原型是否存在于该对象的原型链上 (对象是否是构造函数的一个实例)
function Person(){
}
//p--->Person.prototype--->Object.prototype--->null //原型链
var p = new Person();
//构造函数(Person)的原型是否在该对象(p)的原型链上!
console.log(p instanceof Person); // true
console.log(p instanceof Object); // true
</script>
</head>
<body>
</body>
</html>