Javascript calculation bug (by design)

If you execute this in javascript you get wrong result: F12 Chrome 0.01 + 0.06 0.06999999999999999 or 20.115*100 2011.4999999999998 This is due javascript binary number represantion. There are libraries which solve this: big.js ( bignumber.js ( decimal.js (

JavaScript Namespacing

Source:¬†   There are many ways to safely namespace your objects in JavaScript. This article discusses common practices I have seen. Prefix Namespacing If the goal of namespacing is to avoid collisions. The following system is just as likely to avoid namespace collisions as any other system as long as we know the global variable … Read moreJavaScript Namespacing