Invoking undefined as a function throws now exception.
- Dominant language
- JavaScript
- Stars
- 776
- Forks
- 180
- PR merge metrics
- No merged PRs in 30d
Description
In the following code, `this.bar` is `undefined`. Yet invoking it as a function doesn't make Oh Noes appear.
Oh Noes should appear as soon as you click the mouse button.
```
var Boo = function() {
};
Boo.prototype.foo = function() {
this.bar();
};
var boo = new Boo();
mouseClicked = function() {
boo.foo();
};
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the provided JavaScript snippet in the live editor and click the mouse button to observe the current behavior. Trace the runtime error handling from the undefined function call, then verify that the expected “Oh Noes” message appears after the click without changing the example’s intended behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100