Javascript Object isNumber(n)

Description

Javascript Object isNumber(n)

// Check if n is a valid number
function isNumber(n) {
  return !isNaN(parseFloat(n)) && isFinite(n);
}



PreviousNext

Related