Determine an Object's Constructor with JavaScripts instanceof Operator

Share this video with your friends

Send Tweet

The instanceof operator can be used to figure out which function created an object. However it does have its drawbacks, such as returning false results. In this lesson we'll understand how the instanceof method determines which function created an object and manipulate the results.

Andrew
Andrew
~ 6 years ago

The constructor keyword isn't explained in these videos. And then in the last 15 seconds of video 10 the code is changed to use the constructor keyword inside the class. It happens way to quickly to grasp what is happening. The rest of the course is really great though!