首页 > 其他分享 >ES6-ES11 ES11 BigInt

ES6-ES11 ES11 BigInt

时间:2023-03-11 16:23:37浏览次数:58  
标签:ES6 console log max BigInt let ES11

原视频

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>BigInt</title>
</head>
<body>
    <script>
        //大整形
        // let n = 521n;
        // console.log(n, typeof(n));

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

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

        console.log(BigInt(max))
        console.log(BigInt(max) + BigInt(1))
        console.log(BigInt(max) + BigInt(2))
    </script>
</body>
</html>

标签:ES6,console,log,max,BigInt,let,ES11
From: https://www.cnblogs.com/chuixulvcao/p/17206296.html

相关文章

  • ES6-ES11目录
    ES6-ES11let变量声明以及声明特性ES6-ES11let实践案例ES6-ES11const声明常量以及特点ES6-ES11变量的解构赋值ES6-ES11模板字符串ES6-ES11对象的简化写法ES6-ES......
  • ES6-ES11 ES11绝对全局对象globalThis
    原视频忽略变量环境,引用全局变量html<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><metaname="viewport"content="width=device-width......
  • ES6-ES11 ES11String.prototype.matchAll
    原视频<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><metaname="viewport"content="width=device-width,initial-scale=1.0"><title......
  • ES6-ES11 ES11可选链操作符
    原视频<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><metaname="viewport"content="width=device-width,initial-scale=1.0"><title......
  • ES6-ES11 ES10-Symbol.prototype.description
    原视频<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><metaname="viewport"content="width=device-width,initial-scale=1.0"><title......
  • ES6-ES11 ES10字符串方法扩展-trimStart-trimEnd
    原视频<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><metaname="viewport"content="width=device-width,initial-scale=1.0"><title......
  • ES6-ES11 ES10数组方法扩展-flat与flatMap
    原视频<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><metaname="viewport"content="width=device-width,initial-scale=1.0"><title......
  • 详解avaScript ES6中的import和export
    0、前言前端工程,在最早的时候是没有模块的概念的。随着前端工程的发展,前端开发也越来越规范化,更像是软件工程了。那么随之而来的,为了解决工程化的问题,就引入了模块的概念......
  • ES6-ES11 ES8对象方法扩展
    视频<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><metaname="viewport"content="width=device-width,initial-scale=1.0"><title>E......
  • ES6-ES11 async与await结合读取文件内容
    原视频//1.引入fs模块constfs=require("fs");//读取『为学』functionreadWeiXue(){returnnewPromise((resolve,reject)=>{fs.readFile(".......