Javascript: What is a number?
Check if a value is a number? Simple task. Just do !isNaN(), right? Wrong! Assume we get an object that has multiple properties. For arguments sake, let’s say they might deliver numbers in integer or float and we need to parse them as numbers and they deliver other data of various types. It could be: { myNum: 1, value: "1", someVal: 1.5, a: true, b: [], c: NaN} Can we use isNumber() function? We could, but unfortunately it does not exist (yet)? ...