You might be wondering why I am writing less these days. I assure you, it's not because I am getting lazy (I am ATM 🤩), it's just that I am on a lo...
For further actions, you may consider blocking this person and/or reporting abuse
This is one of the many great reasons to use TypeScript. It's not that TypeScript won't let you do these strange things... it's just that it's like "did you know that you're about to automatically coerce your number to a string?"
I'm not sure typescript will save you from JavaScript itself maybe 50% of the above insanity.
The rest of 50% you can avoid by using '===' instead of '==' as it's recommended everywhere.
I always assumed everyone knew that 😆. It's been a while since I started.
No amount of TypeScript can save you from JS quirks, but at least Saint A. Hejlsberg did a good job helping as much as he could...
These are all fun and games. Until someone asks them in a test during an interview or a programming test and you are one that never met such things because you have enough logic to never end up with such code :p
If I ever got asked one of these in an interview, I'd question the company's approach to attract candidates. And it probably isn't a good place to work either 🧐
And if someone asks you anything like this during an interview, the only valid reply is that you're sane enough not to use it. Then stand up and walk out of... correction - run away as fast as possible.
I'm not sure if the article meant to be sarcasm or not. When I read "HTML can do that?" - 😲🤩, when I read "JS can do that?" - 🤨😞.
Does not matter. Its another version of " __ can do that?". What matter the most is "can you do that?"
I have no idea what you meant
I don't think comparison between posts is a valid thing to do, everyone has different perspectives, and if this has upset you, then it means you probably need to spend a bit more time reading about JS.
In another perspective, some of these might be the cause of a bug in your code base and knowing why it's happening will definitely help you
So it's not sarcasm just coincidence in titles. The only thing I wanted to ask 👌
The only valid reply to "... can do that?" is this meme:
memegenerator.net/img/instances/57...
Mind === blown.
Great article
I didn't know some of these and now I have more ambition to tease my colleagues
😂
This is NOT a 3 minute read! :)
It's a 3 minute read plus 5 minutes of "let me open up the console real quick".
Great article.
Thanks