2 Matching Annotations
- Mar 2024
-
www.cs.princeton.edu www.cs.princeton.edu
-
The occurrence of a do-while instead of a while should always raise a question: why isn't the loop termination condition being tested at the beginning
-
- 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.
-