<!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>
函数参数
网友评论