Contact

Your Name (required)

Your Email (required)

Subject

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

parseInt(’08’);

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 on Directory Convention for AngularJS
  2. Securing ELMAH’s sensitive information Comments Off on Securing ELMAH’s sensitive information
  3. Graceful page rendering during page delays Comments Off on Graceful page rendering during page delays
  4. 50 Shades of Hue Comments Off on 50 Shades of Hue