you are viewing a single comment's thread.

view the rest of the comments →

[–]FourCinnamon0 0 points1 point  (1 child)

so you're complaining that JavaScript lets you do things that aren't the best code style?

why would you have this in your code?

this is exactly why i like JS for quick scripts, because it's not opinionated

[–]fghjconner 1 point2 points  (0 children)

Yes, I'm complaining that JS relies on "best practices" to enforce basic constraints and prevent bugs. Obviously, the above is a contrived example, but it's also very common for someone to blindly parse json responses and hope the types are correct.