js 数据类型

 

 

 

 

 

 

 

 

 

<script>
        //  1 八进制 0-7
        // var num1 = 010;
        // console.log(num1); // 8

        // var num2 = 012;
        // console.log(num2); //10

        // 2 十六进制 0-9  a-f  #ffffff
        // var num3 = 0x9;
        // console.log(num3); // 9

        // var num4 = 0xa;
        // console.log(num4); // 10

        // 3 数字型的最大值
        // console.log(Number.MAX_VALUE); //1.7976931348623157e+308

        // // 4 数字型的最小值
        // console.log(Number.MIN_VALUE); //5e-324

        // 5  无穷大
        // console.log(Number.MAX_VALUE * 2); //  Infinity

        // 6 无穷小
        // console.log(-Number.MIN_VALUE * 2); // -1e-323

        // 7 非数字
        // console.log('eric' - 100); //NaN
    </script>
 
 
 

 

posted @ 2020-06-03 17:01  EricBlog  阅读(64)  评论(0编辑  收藏  举报