//@testconstaTrue=[NaN,undefined,0/0,"0/0",{},"{}","[]",v=>v,"1234ZZZ56","asdf"];constaFalse=[null,0/5,3,-0,"","5",[],Infinity,true,false,1e30,"123.45"];logForeachParam(isNaN,aTrue);logForeachParam(isNaN,aFalse);// throws: BigInt(3145), 3145n; //TypeError: Cannot convert a BigInt value to a number at isNaN
/**
@func
is a non-decimal number, and not an exponent
integers as strings are true
@param {number} n
@return {boolean}
*/constisInt=n=>(/^\d+$/).test(n)//@testconstaTrue=[3,-0,BigInt(3145),3145n,"5"];constaFalse=[NaN,0/0,null,undefined,5/0,"",[],Infinity,true,false,"0/0",{},"{}","[]",v=>v,1e30,"1234ZZZ56","asdf","123-456","123.45",123.45];logForeachParam(isInt,aTrue);logForeachParam(isInt,aFalse);
Yes, the NaN is confusing.