Skip to content

Commit

Permalink
doc: update javascript.md (#271)
Browse files Browse the repository at this point in the history
add JavaScript Functions 函数
line: 472-480
  • Loading branch information
Perzch committed Jan 14, 2023
1 parent dac7e77 commit 6b570f2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,15 @@ function sum(num1, num2) {
sum(2, 4); // 6
```
### 立即执行函数
```javascript
//命名函数并立即执行一次
(function sum(num1, num2) {
return num1 + num2;
})(2,4)//6
```
### 函数表达式
```javascript
Expand Down

0 comments on commit 6b570f2

Please sign in to comment.