r/javascript • u/smellycode • Mar 02 '19
Useful javascript one-liners.
https://medium.com/@smellycode/js-one-liners-8bc0a6af2345?source=friends_link&sk=a9295a05aef9e514e137fca7eeb89cd1
344
Upvotes
r/javascript • u/smellycode • Mar 02 '19
-10
u/Shaper_pmp Mar 02 '19 edited Mar 02 '19
Ligatures are fine, but like any tool they're only useful when they're useful.
Any font that's intended for programming that runs together arbitrary sequences of characters in a way that makes it difficult/impossible to tell at a glance how many there are, however, seems self-evidently sub-optimal... especially in cases where it's the difference between things like type-coercive- and strict equality.
Edit: I just noticed that the triple-equals glyph actually has three lines not two, so it's a little easier to tell them apart than I first realised.
That said, the fact it wasn't necessarily easy to tell whether it had two or three horizontal lines on a mobile screen kind of makes the same point in a different context...