码迷,mamicode.com
首页 > 编程语言 > 详细

08-为数组和arguments

时间:2017-03-19 13:12:44      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:argument   console   div   meta   lang   call   type   html   doc   

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

//    var arr = [];
//    arr.push(1);
//    console.log(arr);

    fn(1,2);
    fn(1,2,3);
    fn(1,2,3,4,5);
    function fn(a,b){
        //只在函数中使用,实参的数组。
//        arguments[0] = 0;
//        console.log(arguments);
        //伪数组:不能修改长短的数组。(可以修改元素,但是不能变长变短)
//        arguments.push(1);
//        console.log(arguments instanceof Array);

//        //形参个数
//        console.log(fn.length);
//        //实参个数
//        console.log(arguments.length);

        //arguments.callee整个函数。函数名。
//        console.log(arguments.callee);
    }


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

  

08-为数组和arguments

标签:argument   console   div   meta   lang   call   type   html   doc   

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

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