DEV Community

Discussion on: What is the oddest JavaScript behavior?

 
camdhall profile image
CamDHall • Edited

I started programming in JS. I spent probably 5 or 6 years working only with JS. But even before I started working with C# and C++, I thought the way JS handles things was clearly not the best way of handling them.

I can go further on the banking example. Even if I didn't follow the law, robbing a bank is not a smart move. There's easier targets. Less risky targets. Probably even targets that pay all most as well, with far less chance of being caught. So it's still pretty stupid, even in the context of being a criminal. I don't know a lot of thiefs, but I suspect if you ask a bunch of thiefs if robbing a bank is a good idea, they'd tell you no. Rob some poor guy leaving the atm or something.

JavaScript could definitely handle types better. Among other things. Even in the context of what it's used for. Typescript is maybe a good example of this.

I'm also not being malicious or anything. I Like JS, it's still what most of my side projects are in, even though I could choose to use something else. But it has problems. Some of which are self imposed.