0 Replies Latest reply on Nov 26, 2012 6:32 AM by jfb00

    Infinity issue

    jfb00 Level 3

      Hi All,

      I have this issue:

      StringIs NumberConverted Number
      “123”true123
      “123 Abc”falseNaN
      “Infinity”trueInfinity
      “Infinity Abc”trueInfinity

       

      The next validation only works when the result is NaN, how can I validate the infinity?

      if (isNaN(Number(tempString)))

           tempString = 0;

      Thanks,