-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy path1-prototype.js
More file actions
32 lines (24 loc) · 791 Bytes
/
Copy path1-prototype.js
File metadata and controls
32 lines (24 loc) · 791 Bytes
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
29
30
31
32
'use strict';
console.log(Function);
const AsyncFunction = (async () => {}).constructor;
console.log(AsyncFunction);
const fn = () => {};
const afn = async () => {};
console.dir({
fn: typeof fn,
afn: typeof afn,
});
console.log(fn instanceof Function);
console.log(afn instanceof Function);
console.log(fn instanceof AsyncFunction);
console.log(afn instanceof AsyncFunction);
console.log(afn.__proto__.constructor);
console.log(afn.__proto__.__proto__.constructor);
console.log(afn.__proto__.__proto__.__proto__.constructor);
console.log();
console.log(Object.getPrototypeOf(afn).constructor);
console.log(Object.getPrototypeOf(Object.getPrototypeOf(afn)).constructor);
console.log(
Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(afn)))
.constructor,
);