Explore Enterprise Education Gitee Premium Gitee AI AI teammates
Fetch the repository succeeded.
Donate
Please sign in before you donate.
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
4 Star 11 Fork 16

Swot/learning

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
Already have an account? Sign in
文件
master
Branches (4)
master
devel
homework
test_icons_font
master
Branches (4)
master
devel
homework
test_icons_font
Clone or Download
Clone/Download
Prompt
To download the code, please copy the following command and execute it in the terminal
To ensure that your submitted code identity is correctly recognized by Gitee, please execute the following command.
When using the SSH protocol for the first time to clone or push code, follow the prompts below to complete the SSH configuration.
1 Generate RSA keys.
2 Obtain the content of the RSA public key and configure it in SSH Public Keys
To use SVN on Gitee, please visit the usage guide
When using the HTTPS protocol, the command line will prompt for account and password verification as follows. For security reasons, Gitee recommends configure and use personal access tokens instead of login passwords for cloning, pushing, and other operations.
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # Private Token
master
Branches (4)
master
devel
homework
test_icons_font
learning
/
javascript
/
src
/
function_parameter.html
learning
/
javascript
/
src
/
function_parameter.html
function_parameter.html 1.46 KB
Copy Edit Raw Blame History
wangzhaohe authored 2023年01月20日 23:40 +08:00 . javascript finished
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>函数的参数</title>
</head>
<body>
<script type="text/javascript">
// delims is here, so use @clean
// 在上面的函数声明中函数都是没有参数的,其实对函数的参数来说
//
// - 可以无参数
// - 可以有有限个参数
// - 可以有不定长参数
//
// // 下面的实例分别对函数的参数进行介绍:
// // 函数 fun1 定义的是无参函数
// // 函数 fun2 定义的是含有两个参数的函数
// // 函数 fun3 定义的是含有变长参数的函数
// // 注意为了书写方便,引入了 ES6 的模板字符串 `${}`
//
// [source,javascript,linenums]
// ----
function fun1() {
console.log("无参数");
}
fun1();
function fun2(a,b) {
console.log(`两个参数 a=${a},b=${b}`);
}
fun2("Hello", "World!")
function fun3(...param) {
len = param.length;
for (i=0; i<len; i++) {
console.log(`参数 ${i} = ${param[i]}`);
}
}
fun3(1,3,5,7,9)
// ----
// 输出结果:
// ....
// 无参数
// 两个参数 a=Hello,b=World!
// 参数 0 = 1
// 参数 1 = 3
// 参数 2 = 5
// 参数 3 = 7
// 参数 4 = 9
// ....
</script>
</body>
</html>
Loading...
Report
Report success
We will send you the feedback within 2 working days through the letter!
Please fill in the reason for the report carefully. Provide as detailed a description as possible.
Please select a report type
Cancel
Send
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

About

开发学习笔记
Cancel

Releases

No release

Contributors

All

Activities

can not load any more
Edit
About
Homepage
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/swotpp/learning.git
git@gitee.com:swotpp/learning.git
swotpp
learning
learning
master
Going to Help Center

Search

Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register

AltStyle によって変換されたページ (->オリジナル) /