<!DOCTYPE html>
<html>
<head>
<title>01_define.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<script type="text/javascript">
console.log('函数的属性length,指的是该函数所期望传递进来的参数个数');
function f1(){
}
function f2(num1,num2){
}
function f3(num){
}
//length是函数的属性,不是内部属性,所以通过函数名.属性来调用
console.log(f1.length);
console.log(f2.length);
console.log(f3.length);
</script>
</head>
<body>
This is my HTML page. <br>
</body>
</html>
JS 函数length
最新推荐文章于 2024-02-21 09:09:19 发布