Yeah, that's r/firstWeekProgrammerHumor stuff. We probably should mention something like console.log doesn't actually create a log (with timestamps and such).
I did the same until I took a class on Python and started talking about logging. You know what's even funnier? The console object even includes different logging levels. You can use console.info or console.error or whatever.
"Truthy" shouldn't be a thing in any programming language. The fact that Javascript is not just truthy, but inconsistent at best with it is wild. And even more wild is people decided that it was a language they wanted to use in backend infrastructure.
The language was created in a day and the only reason the creator named it that is because Java was popular at the time. And now the entire internet runs on it
Eslint's eqeqeq rule has an option to allow loose equality in some specific cases, including the aforementioned null check case. I haven't looked for projects that set eqeqeq to "smart", but I have to assume there is at least one out there.
Sure not, JS is also a monstrosity. Maybe create a nice Python web framework instead (Python was created four years before PHP) or a simple well-designed typed language like Gleam. PHP was successfully at that time because it was easy to use with Apache and was specifically designed for web.
View all comments
Show parent comment
71
u/ustp Oct 29 '26
You would like to use JS instead?