The Holy Trinity of JavaScript
The Holy Trinity of JavaScript
The Holy Trinity of JavaScript
Sorry, 0 == '\t'
? What?
Yeah, it's true
. I knew all the other ones, had to put that one in the dev tools console to believe it. I was just happy to know === continues to be sane in that comparison.
You have to remember that the underlying principle of JavaScript seemed to be "never throw an error", even if what it's being told to do is weapons grade bollocks.
Are people really not using the strict equality operator?
"The trinity makes as much sense as Javascript" is a vulgar condemnation of Christian dogma.
Fuck this language with a pineapple
Lots of silliness indeed, yet I can't remember the last time I had to use a non-strict comparison.
Yes, it's been established that you can still use JavaScript, and it will only backfire sometimes, even though it's a bad language. And yet, people try to use it where it's not even required.
This never gets old lmao
As a person who is coding adjacent (I work with basic SQL and VBA, once learned but never used HTML & CSS, learned some C+, some JavaScript...) I don't fully understand most of the memes here, but it feels like I'm learning a bit through immersion like being a non-native speaker in a foreign land. It's a fun ride.
===
is just ==
with extra steps
It's actually the other way around. == has to perform type coercions as part of its equality algorithm, whereas === does not, so == has more steps.
It's to be REALLY sure
Gonna show this to my Discrete math professor
I don’t work with web stuff, why is js so weird? Can you write a website in other languages, like c# or python?
Most of the weirdness comes from being designed for the web, and specifically for working with forms. The value of a form field will always be a string, which is a simple and straightforward idea, but then the trouble showed up when we tried to make it more convenient to work that way.
I guess why it's weird because of the loose rules it follows, like what is mentioned about === and ==. There is WebAssembly which kinda acts like Javabyte code or CIL there used to be huge hype that it's going to replace JavaScript, though it's not used that much today. I think why there is low adoption is mainly because JavaScript is good enough, it's widespread and easy to learn.
Can you write a website in other languages, like c# or python?
Yeah, anything that outputs HTML and CSS can do so. There's a module for Apache to write webpages in Python (libapache-mod-python
) and I'm p sure someone somewhere made a module to do it in Rust already except they're infighting over whether tag parsing in it should be marked unsafe
.
For that matter you do can write web pages in your shell eg.: bash
, that's what CGI is all about.
A few years back I came to the conclusion that the holy trinity in Christianity are three levels of abstraction: the son = God walks on earth and tangible, the father = God in heaven untangible but still reachable by speech, holy spirit = God in who knows where.
Then I thought that as a way of imparting the thought that any level of abstraction of the universe would also be inhabitated by God, those which we can sense, and those where our senses can't reach. The idea that omniprescense is not only limited to our dimension.
I'm not sure if that is the original meaning but is a way of seeing it that I can relate to, since I've always been akeen to a more abstract idea of God, and not so much to a figure that praises itself of thought, which is a human attribute.
As far as I can tell, the doctrine of the trinity served political rather than logical purposes back when it was put in writing in late antiquity, and since then it's just been the doctrine. If you want to believe, you just have to believe and not think about it too hard, like the video says.
== is a heathen with no rightful place except equality to null. All praise ===
That’s what I used to think but it turns out to be the most Christian operator there is.
Eval works in mysterious ways
I Object to your terrible pun