Why JavaScript has two zeros: -0 and +0


Do you know there are two valid zero representations in JavaScript? In pure mathematics, zero means nothing and its sign doesn't matter. +0 = -0 = 0. Computers can't represent value well enough and mostly use the IEEE 754 standard. Most languages have two zeros! The IEEE 754 standard for floating point numbers allows for … Continue reading Why JavaScript has two zeros: -0 and +0

Things to check before releasing your web application


This post originally started out as a list of tips on how to break web applications but quickly morphed into a pre-release checklist. So here are a couple of things to validate before you press the 'go-live' button on that wonderful web application of yours. General Does the application handle extremely large input? Try copying a … Continue reading Things to check before releasing your web application

Understanding JavaScript Property Descriptors 3


If this is your first time here, you should read the part 1 and part 2 of this series. Then come back to this to continue. Now that we know the basics, this post covers the JavaScript methods for setting and modifying object property descriptors. 1. Object.preventExtensions() This blocks the addition of new properties to an object. Literally, … Continue reading Understanding JavaScript Property Descriptors 3