Skip to content

Commit 20a5e6b

Browse files
authored
Update object.md
const descriptor = Object.getOwnPropertyDescriptor(o, 'foo'); ==> const descriptor = Object.getOwnPropertyDescriptor(obj, 'foo');
1 parent e81d671 commit 20a5e6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/object.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ const obj = {
266266
obj.foo.name
267267
// TypeError: Cannot read property 'name' of undefined
268268

269-
const descriptor = Object.getOwnPropertyDescriptor(o, 'foo');
269+
const descriptor = Object.getOwnPropertyDescriptor(obj, 'foo');
270270

271271
descriptor.get.name // "get foo"
272272
descriptor.set.name // "set foo"

0 commit comments

Comments
 (0)