Skip to main content

JavaScript check number function.

function isNumber(n) {
  return !isNaN(parseFloat(n)) && isFinite(n);
}