Get the latest tech news
The big and Small of JavaScript numbers (2017)
For all its warts, JavaScript has some novelties few other languages have. In this post I want to share about JavaScript numbers, which both acknowledge normal mathematics and the fact that they ar…
In this post I want to share about JavaScript numbers, which both acknowledge normal mathematics and the fact that they are represented by an imperfect data format. While I encourage you to read the MDN article on Number, I want to provide a few patterns I have found useful when working in JavaScript that I can’t often use in other languages. Again, we have a single expression valid for all inputs which also indicates our intention: to constrain a within certain bounds (the if provides no such context apart from reading the code within).
Or read this on Hacker News