Yoko Oh Noes confused about hoisting and loops
- Dominant language
- JavaScript
- Stars
- 776
- Forks
- 180
- PR merge metrics
- No merged PRs in 30d
Description
See the demo program at https://www.khanacademy.org/computer-programming/confused/5208304615768064 . It attempts to initialize a variable declared inside the body of a loop to **undefined** causing the complaint "It's not necessary to initialize 't' to 'undefined'." which is certainly not the case.
Contributor guide
No contributing guide indexed for this repository
Research direction
Open the linked Khan Academy demo first and reproduce the warning about initializing 't' to 'undefined'. Then locate the live editor diagnostic that reports this message and determine why the loop-scoped declaration is treated as unnecessary; done means the valid example no longer produces the complaint.
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