The Number MAX_SAFE_INTEGER static property represents the maximum safe integer JavaScript can represent exactly and to correctly compare. For larger integers, use BigInt.

    
    console.log(Number.MAX_SAFE_INTEGER);
    // 9007199254740991