Javascript Number toIntZero()

Description

Javascript Number toIntZero()


Number.prototype.toIntZero = function(){
  var val = parseInt(this);
  if(isNaN(val)){
    return 0;/* ww  w .j  ava2  s .c  o  m*/
  }else{
    return val
  }
};



PreviousNext

Related