21 lines
352 B
Plaintext
21 lines
352 B
Plaintext
|
let F = function (n) { this.a = n }
|
||
|
let f = function () { return this.a }
|
||
|
let fs = function () { "use strict"; return this.a }
|
||
|
let value = new F(12)
|
||
|
value.a
|
||
|
f()
|
||
|
fs()
|
||
|
fs.call({ a: 11, b: 22 })
|
||
|
F(99)
|
||
|
a
|
||
|
let obj = Object.create({ f })
|
||
|
obj
|
||
|
obj.a = "yeah"
|
||
|
obj
|
||
|
obj.f()
|
||
|
|
||
|
Object.getOwnPropertyNames(obj)
|
||
|
Object.getOwnPropertyNames(Object.getPrototypeOf(obj))
|
||
|
|
||
|
|