Skip to content

Class checking: "instanceof" misleading sentence and example. #3747

@fjavier-jp

Description

@fjavier-jp

Great tutorial, thanks so much!
Since the comment section was removed, just wanted to add here a correction. In the parragraph: "It also works with constructor functions:" the example below is not a constructor function. What you are using is precisely an instance of Rabbit, but in the form of "new Rabbit()". It could be misleading to say that the instanceof operator works with constructor functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions