javascript-tutorial / javascript-tutorial/en.javascript.info

Class checking: "instanceof" misleading sentence and example.

Open
#3,747 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
25.5k
Forks
4k
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the tutorial section containing the sentence “It also works with constructor functions:” and its `new Rabbit()` example. Read the surrounding explanation of `instanceof`, then correct the misleading wording and example distinction; done means the passage accurately describes what `instanceof` operates on.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.