They're wrong because they're most likely straight out of ChatGPT (or similar), and the author has not checked them before posting. Try entering the following into ChatGPT:
Write an article titled "Mastering JavaScript: Top 50 One-Liners Every Developer Should Know"
You'll get many of the same examples, with the same mistakes.
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
They're wrong because they're most likely straight out of ChatGPT (or similar), and the author has not checked them before posting. Try entering the following into ChatGPT:
You'll get many of the same examples, with the same mistakes.