TLDR Web Dev · ARTICLES & TUTORIALS

MAKING SENSE OF “SENSELESS” JAVASCRIPT FEATURES

smashingmagazine.com14 min read

Summary from the TLDR Web Dev newsletter

This article discusses "senseless" JavaScript features, such as the floating-point format and why 0.1 + 0.2 doesn't equal 0.3, type coercion and why using === is preferred over ==, automatic semicolon insertion and its limitations, the presence of two bottom values (null and undefined), and the use of increment (++) and decrement (--) operators. These quirks are important to understand as they can lead to hard-to-debug issues. By avoiding certain constructs as shown by examples in the article, developers can make their code more readable.