This example, while nice and short, is a bit deceptive: it suggests that you can simply pass the result text to the parseInt global function without a radix argument, and it will work as expected.