Your Name (required)

Your Email (required)


Your Message

Recent Posts

Radix Default for parseInt()

So, recently I see that parseInt() now defaults to radix of 10 in most modern browsers. However, it is still best practice to specify the radix when using parseInt() because you can’t guess the browser the user is on. I used to get burned on this gotcha with something like


The default radix used to be octal which would make code snippet’s output 0.

It is great that the default is now radix 10 but best practice is to always specify the radix.

  1. Directory Convention for AngularJS Comments Off
  2. Securing ELMAH’s sensitive information Comments Off
  3. Graceful page rendering during page delays Comments Off
  4. 50 Shades of Hue Comments Off