r/programminghorror • • Jun 12 '25 • This 1

Javascript Javascript is filled with horror

Post image
2.4k Upvotes

337 comments sorted by

View all comments

Show parent comment

-3

u/Randolpho Jun 12 '25

Javascript does it that way because browsers do it that way, and be thankful that choice was made, or else no web page online would render because none of them adhere to the standard.

15

u/LutimoDancer3459 Jun 12 '25

If it were like that, they would be forced to stick to the standard. Nothing bad

-2

u/Randolpho Jun 12 '25

You don’t remember the strict xhtml 4 days, I take it.

8

u/LutimoDancer3459 Jun 12 '25

I am a java developer. I use/ed jsf. Which uses xhtml. So sure. And I prefer it. I dont know why I should expect the browser to render something useful if I missed adding a closing tag.

Most language shout at you if you miss the closing bracket or semicolon... why should i expect the browser languages to behave differently?

Never encounter any endpoint that accepts an malformed json/rest/or whatever format you want to use...