Ad
Code
Diff
  • const returnInputNumber = (n = 0) => {
      return isNaN(n) ? 0 : n;
    };
    • const returnInputNumber = (n = 0) => {
    • return typeof n === "number" ? n : 0;
    • return isNaN(n) ? 0 : n;
    • };