美文网首页
js_19 函数参数

js_19 函数参数

作者: basicGeek | 来源:发表于2018-11-22 10:56 被阅读0次
    <!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>
    
    函数参数

    相关文章

      网友评论

          本文标题:js_19 函数参数

          本文链接:https://www.haomeiwen.com/subject/lsokqqtx.html