Khan / Khan/live-editor

Do not display "Mozilla JavaScript Extension" advice

Open
#652 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
776
Forks
180
PR merge metrics
No merged PRs in 30d

Description

A friend of mine (@clementinehahn) who's learning JS tried this in the live editor in Khan Academy:
```js
var x = function();
{
// body
}
```

She recieved the following oh-noes advice:

> 'function closure expressions' is only available in Mozilla JavaScript extensions (use moz option).

I think it's not a good idea to expose beginners to JavaScript language extensions especially as [Mozilla is working to getting rid of them all](https://bugzilla.mozilla.org/show_bug.cgi?id=1103158).

I would first recommand to not display this message at all.

As a secundary advice, the problem she has is an extra semicolon, so she would need to be advised to remove it (that's what i said, she tried it and can move forward now).

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the snippet in the Khan Academy live editor and locate where the “Mozilla JavaScript extensions” advice is generated. Check the handling of the extra semicolon and adjust the resulting guidance so beginners are not directed toward Mozilla extensions; done when this example gives appropriate advice.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.