Compare commits

..

3 Commits

Author SHA1 Message Date
82324f6274 docs(web): 更新javascript基础文档中函数部分的描述
添加函数声明格式说明并完善函数定义描述
2025-12-05 13:32:37 +08:00
3531360974 Merge branch 'main' of https://gitea.simengweb.com/si-meng-spec/SiMengWebSite_Notes 2025-12-01 15:21:44 +08:00
da188afd82 docs(web): 修正HTML列表与语义布局文档的标题
将文档标题从"test"修改为"html 列表与语义布局",使其更准确地反映文档内容
2025-12-01 15:21:37 +08:00
2 changed files with 11 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
---
title: test
title: html 列表与语义布局
createTime: 2025/11/02 20:47:50
permalink: /programming/web/basic-syntax/html-lists-and-semantic-layout/
---

View File

@@ -293,7 +293,7 @@ while (count <= 5) {
## 函数
函数是可重用的代码块,用于执行特定任务
函数是一段可重复使用的代码块,可以接受输入(参数),执行操作,并返回输出(返回值)
### 函数声明
@@ -306,6 +306,15 @@ const message = greet("小明");
console.log(message); // 输出:你好,小明!
```
格式如下
```javascript
function 函数名(参数1, 参数2, ...参数N) {
// 函数体:要执行的代码
return 返回值; // 可选
}
```
### 箭头函数ES6
```javascript