javascript-tutorial / javascript-tutorial/en.javascript.info
{}.toString() now throws SyntaxError in browser, what happened?
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 25.5k
- Forks
- 4k
- PR merge metrics
- No merged PRs in 30d
Description
Regarding 1-js/09-classes/06-instanceof, now Edge/Chrome browsers don't like this syntax anymore, and throws Uncaught SyntaxError: Unexpected token '.'
Now we have to write ({}).toString(). In Node.js {}.toString() still works. Was there a change in the spec recently or it's actually a bug in brower?
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 with 1-js/09-classes/06-instanceof/article.md and reproduce the reported expression in Edge, Chrome, and Node.js. Check whether the article’s example needs clarification about parsing at the start of a statement, and document the browser behavior and the correct form if the issue is confirmed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100