-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprototype.html
More file actions
28 lines (26 loc) · 1.43 KB
/
prototype.html
File metadata and controls
28 lines (26 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<script type="text/javascript">
function Animal(){}
var anim=new Animal();
console.log('anim.constructor===Animal:'+(anim.constructor===Animal)) ; //true
console.log('Animal===Animal.prototype.constructor:'+(Animal===Animal.prototype.constructor)) ; //true
console.log("Animal.prototype.constructor:"+Animal.prototype.constructor);
console.log('Animal.constructor===Function.prototype.constructor:'+(Animal.constructor===Function.prototype.constructor)); //true
console.log("Function.prototype.constructor:"+Function.prototype.constructor);
console.log('Function.prototype.constructor===Function:'+(Function.prototype.constructor===Function)); //true
console.log("Function.prototype.constructor:"+Function.prototype.constructor);
console.log('Function.constructor===Function.prototype.constructor:'+(Function.constructor===Function.prototype.constructor)); //true
console.log("Function.prototype.constructor:"+Function.prototype.constructor);
console.log('Object.prototype.constructor===Object:'+(Object.prototype.constructor===Object)); //true
console.log("Object.prototype.constructor:"+Object.prototype.constructor);
console.log('Object.constructor====Function:'+(Object.constructor===Function)); //true
console.log("Object.constructor:"+Object.constructor);
</script>
<body>
<strong>Hello World</strong>
</body>
</html>