Typeof does't work how I want

Hi,

I want to check type of an input number. When I write number (for example 5) the code doesn’t because I want: http://jsfiddle.net/8Observer8/9wsdK/

typeof is not useful for determining if you have a number there.
Input fields are always provided as a string.

You can use parseFloat() to check if a string can be interpreted as a number. For example:


if (!parseFloat(number)) {

Hi,

A prompt will always return a String.
Simple as that, really.

Thanks!

It’s the solution: http://jsfiddle.net/8Observer8/9wsdK/1/