codecombat / codecombat/esper.js
Redeclaration of const should throw SyntaxError
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 99
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
You can do attempt to change a const variable without any error. For example, it should throw an error SyntaxError: redeclaration of const y instead of silently not reassigning y in this code
const y = 2;
y = 4;
print(y); // prints 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the provided const y example and trace the interpreter's handling of const declarations and later assignments. Done means assigning to a const throws SyntaxError: redeclaration of const y instead of silently leaving y unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100