You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We then use our common knowledge of JS and assume that Foo is a class because its prototype field was used to add the functionfoobar . Similar for Bar, foo and bar.
Generally: Can't we assume that the word left from prototype or constructor is a class and that the word to the right of prototype or the left of either apply, bind or call is a function?
Of course, this will cause false positives, but it will only do so on very few occasions.
The text was updated successfully, but these errors were encountered:
When reading JS code, you sometimes come across a line like this:
We then use our common knowledge of JS and assume that
Foo
is a class because itsprototype
field was used to add the functionfoobar
. Similar forBar
,foo
andbar
.Generally: Can't we assume that the word left from
prototype
orconstructor
is a class and that the word to the right ofprototype
or the left of eitherapply
,bind
orcall
is a function?Of course, this will cause false positives, but it will only do so on very few occasions.
The text was updated successfully, but these errors were encountered: