- Feb 2024
-
en.wikipedia.org en.wikipedia.org
-
Primus inter pares is a Latin phrase meaning first among equals.[a]
-
- Apr 2023
-
www.construct.net www.construct.net
-
typeof OffscreenCanvas !== "undefined"
The second
=
sign is completely superfluous here. Only one is necessary.
-
- Aug 2022
-
martinfowler.com martinfowler.com
-
It's often a good idea to replace common primitives, such as strings, with appropriate value objects.
-
-
jimmyhmiller.github.io jimmyhmiller.github.io
-
if (property === 'firstName')
Tags
Annotators
URL
-
-
firefox-source-docs.mozilla.org firefox-source-docs.mozilla.org
-
In JavaScript, == is preferred to ===.
-
- Jul 2022
-
blog.shimin.io blog.shimin.io
-
const div3 = n % 3 === 0; const div5 = n % 5 === 0;
-
-
www.reddit.com www.reddit.com
-
It made sense when JS was doing small simple things in HTML - it doesn’t make much sense anymore
No, it still makes sense.
Insisting that everyone use
===
everywhere, on the other hands, makes as much sense as disallowing method declarations that accept a parameter that implements an interface (in favor of formal parameters that insist on a certain class or a derivative), or injecting a bunch ofinstanceof
checks for no good reason... -
I have rarely encountered a good reason to use == in JS. Most of the time, or you are relying on it, you are probably doing something wrong.
-
Easier to just add a new operator that does things the right way and keep the original == operator as is. That way people can transition on their own time
Stupid myth.
-
- May 2022
-
news.ycombinator.com news.ycombinator.com
-
typeof v === "number"
Using triple equals to check the results of
typeof
is totally unnecessary, and a sure sign that someone, somewhere has unthinkingly adopted some dubious advice; it's a code smell/red flag.A standard equality comparison (using
==
) does exactly the right thing while also avoiding association with questions/doubts about the quality of the surrounding code.
-
- Mar 2022
-
people.csail.mit.edu people.csail.mit.edu
-
Lesson: use === and !==
No. Actual lesson: know your types.
-
- Feb 2017
-
static1.squarespace.com static1.squarespace.com
-
Though black their skins as shades of night Their hearts are pure, their souls are white
I can fully understand how this poem would help to win over the whites among her crowd, but it seems to be a bit like she is giving in to the idea that white is better than black. It comes off to me that she is stating they are not equals unless the souls reflect as white.
Tags
Annotators
URL
-