大整形

 // 大整形
      // let n = 521n;
      // console.log(n,typeof(n));

      // 函数
      // let n = 123;
      // console.log(BigInt(n));


      // 大数值 运算
      let max = Number.MAX_SAFE_INTEGER;
      console.log(max); // 9007199254740991
      console.log(max + 1); // 9007199254740992
      console.log(max + 2); // 9007199254740992

      console.log(BigInt(max)); // 9007199254740991n
      console.log(BigInt(max) + BigInt(1)); // 9007199254740992n
      console.log(BigInt(max) + BigInt(2)); // 9007199254740993n 
posted @ 2021-05-24 19:49  13522679763-任国强  阅读(45)  评论(0)    收藏  举报