Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

isInt 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))
  }
 
PREVIOUS NEXT
Tagged: #isInt #js
ADD COMMENT
Topic
Name
5+9 =