码迷,mamicode.com
首页 > 其他好文 > 详细

16-构造函数原理

时间:2017-03-19 13:46:59      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:htm   rip   doc   title   number   var   函数   return   type   

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<script>


    var num1 = new Number(111);
    console.log(num1);

    var num2 = Number("111");
    console.log(num2);

    var aaa = new Strings(222);
    console.log(aaa);

    var bbb = Strings("333");
    console.log(bbb);
    function Strings(num){
        this["[[PrimitiveValue]]"] = num;
        return num/1;
    }



</script>
</body>
</html>

  

16-构造函数原理

标签:htm   rip   doc   title   number   var   函数   return   type   

原文地址:http://www.cnblogs.com/sj1988/p/6579823.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!