Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

is_int js

/**
 * verifie si value est de type int
 * check if value is int
 * 
 * @return {boolean} 
 */
function isInt(value) {
    return !isNaN(value) && (function(x) { return (x | 0) === x; })(parseFloat(value))
  }
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #js
ADD COMMENT
Topic
Name
2+3 =