Skip to content

Commit

Permalink
removing extraneous space
Browse files Browse the repository at this point in the history
  • Loading branch information
getify committed May 17, 2018
1 parent 9d37678 commit 6e77b02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion this & object prototypes/ch6.md
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ Because `Foo.prototype` (not `Foo`!) is in the `[[Prototype]]` chain (see Chapte

Of course, there is no `Foo` class, only a plain old normal function `Foo`, which happens to have a reference to an arbitrary object (`Foo.prototype`) that `a1` happens to be delegation-linked to. By its syntax, `instanceof` pretends to be inspecting the relationship between `a1` and `Foo`, but it's actually telling us whether `a1` and (the arbitrary object referenced by) `Foo.prototype` are related.

The semantic confusion (and indirection) of `instanceof` syntax means that to use `instanceof`-based introspection to ask if object `a1` is related to the capabilities object in question, you *have to* have a function that holds a reference to that object -- you can't just directly ask if the two objects are related.
The semantic confusion (and indirection) of `instanceof` syntax means that to use `instanceof`-based introspection to ask if object `a1` is related to the capabilities object in question, you *have to* have a function that holds a reference to that object -- you can't just directly ask if the two objects are related.

Recall the abstract `Foo` / `Bar` / `b1` example from earlier in this chapter, which we'll abbreviate here:

Expand Down

0 comments on commit 6e77b02

Please sign in to comment.