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

为数组和arguments

时间:2019-01-16 17:20:34      阅读:208      评论:0      收藏:0      [点我收藏+]

标签:har   lan   cal   doctype   bsp   callee   array   rip   使用   

 1 <!DOCTYPE html>
 2 <html>
 3 <head lang="en">
 4     <meta charset="UTF-8">
 5     <title></title>
 6 </head>
 7 <body>
 8 <script>
 9 
10 //    var arr = [];
11 //    arr.push(1);
12 //    console.log(arr);
13 
14     fn(1,2);
15     fn(1,2,3);
16     fn(1,2,3,4,5);
17     function fn(a,b){
18         //只在函数中使用,实参的数组。
19 //        arguments[0] = 0;
20 //        console.log(arguments);
21         //伪数组:不能修改长短的数组。(可以修改元素,但是不能变长变短)
22 //        arguments.push(1);
23 //        console.log(arguments instanceof Array);
24 
25 //        //形参个数
26 //        console.log(fn.length);
27 //        //实参个数
28 //        console.log(arguments.length);
29 
30         //arguments.callee整个函数。函数名。
31 //        console.log(arguments.callee);
32     }
33 
34 
35 </script>
36 </body>
37 </html>

 

为数组和arguments

标签:har   lan   cal   doctype   bsp   callee   array   rip   使用   

原文地址:https://www.cnblogs.com/BingBing-Deng/p/10277980.html

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