News for hackers. Stuff that matters.
Re:Angular 2 Final Released by Klathmon on Thursday September 15, 2016 @11:31AM (#12506989)
he's right...

(!isNaN('100') && isFinite('100')) === true

My check would treat '100' as a number, so if i did something like this it would break unexpectedly:

    var num = '100'
    if ((!isNaN(num) && isFinite(num)) === true) {
      console.log(num + 10)
    }
You'll get "10010" printed to the console.
Re:Angular 2 Final Released by abaco on Thursday September 15, 2016 @11:39AM (#12507055)
Well that's because this is checking if a value may be a valid number. It's not safely converting the value to a number. That's done after a parseFloat()
Re:Angular 2 Final Released by jomamaxx on Thursday September 15, 2016 @11:56AM (#12507200)
You guys make my point for me.

There's no way on earth we'd be arguing about such a ridiculously trivial thing for most other languages.

Nobody should have to look any of this up.

Yeah, we work around it ... but it drives me crazy. :)