console.log(Number.isSafeInteger(Number.MAX_SAFE_INTEGER))
console.log(Number.isSafeInteger(Number.MAX_SAFE_INTEGER + 1))
结果
true
false
console.log(Number.isSafeInteger(Number.MAX_SAFE_INTEGER))
console.log(Number.isSafeInteger(Number.MAX_SAFE_INTEGER + 1))
结果
true
false