Compare commits
3 Commits
8ad5c45a42
...
82324f6274
| Author | SHA1 | Date | |
|---|---|---|---|
| 82324f6274 | |||
| 3531360974 | |||
| da188afd82 |
@@ -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/
|
||||
---
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user