Posted By

mArm on 05/12/11


Tagged

variablenumeric


Versions (?)

Test if variable is numeric


 / Published in: JavaScript
 

URL: http://www.ansermot.ch/devs/snippets/2011/javascript-test-if-variable-is-numeric.html

Works !

  1. function isNumeric(input) {
  2. return (input - 0) == input && input.length > 0;
  3. }

Report this snippet  

You need to login to post a comment.