-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #939 from pipisebastian/pipisebastian
23-1μ₯ μ€ν 컨ν μ€νΈ - μ₯μμ€
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
## π‘ 23.1 μμ€μ½λμ νμ | ||
|
||
- μμ€μ½λ νμ μ λ°λΌ -> μμ€ μ½λ **νκ°** -> **μ€ν** 컨νμ€νΈ μμ± | ||
|
||
- **μ μ μ½λ** | ||
- μ μ μ€μ½ν μμ± (μ μ λ³μ κ΄λ¦¬λ₯Ό μν΄) | ||
- μ μ λ³μ/ν¨μλ₯Ό μ μ κ°μ²΄μ νλ‘νΌν°/λ©μλλ‘ λ°μΈλ© (μ°Έμ‘°νκΈ° μν΄ μ μ κ°μ²΄μ μ°κ²°νλ κ²μ) | ||
- **ν¨μ μ½λ** | ||
- μ§μ μ€μ½ν μμ± (μ§μ λ³μ, 맀κ°λ³μ, arguments κ°μ²΄ κ΄λ¦¬λ₯Ό μν΄) | ||
- μ§μ μ€μ½νλ₯Ό μ μ μ€μ½νμμ μμνλ μ€μ½ν 체μΈμ μΌμμΌλ‘ μ°κ²°ν΄μΌ ν¨ | ||
- **eval μ½λ** | ||
- strict modeμμ μμ λ§μ λ μμ μΈ μ€μ½ν μμ± | ||
- **λͺ¨λ μ½λ** | ||
- λͺ¨λλ³λ‘ λ 립μ μ μ€μ½ν μμ± | ||
|
||
## π‘ 23.2 μμ€μ½λμ νκ°μ μ€ν | ||
|
||
- **μμ€μ½λ νκ°** + **μμ€μ½λ μ€ν** 2λ¨κ³ | ||
![](https://velog.velcdn.com/images/pipi/post/31e99f3a-69a4-4fe1-b1a6-ed30382157a3/image.png) | ||
|
||
```js | ||
|
||
``` | ||
|
||
- **μμ€μ½λ νκ°** | ||
|
||
- μ€ν 컨ν μ€νΈ μμ± | ||
- λ³μ/ν¨μ μ μΈλ¬Έ μ€ν -> μμ±λ λ³μ/ν¨μ μλ³μλ₯Ό <u>μ€ν 컨ν μ€νΈκ° κ΄λ¦¬νλ μ€μ½ν</u>μ λ±λ‘ | ||
|
||
- **μμ€μ½λ μ€ν** | ||
|
||
- μ μΈλ¬Έμ μ μΈν μμ€μ½λκ° μμ°¨μ μΌλ‘ μ€ν(λ°νμ μμ) | ||
- μμ€μ½λ μ€νμ νμν μ 보λ€μ <u>μ€ν 컨ν μ€νΈκ° κ΄λ¦¬νλ μ€μ½ν</u>μ μ»λλ€. + μμ€μ½λμ μ€νκ²°κ³Όλ <u>μ€ν 컨ν μ€νΈκ° κ΄λ¦¬νλ μ€μ½ν</u>μ λ±λ‘λλ€. | ||
|
||
- **λμ μμ** | ||
```js | ||
var x; | ||
x = 1; | ||
``` | ||
- **μμ€μ½λ νκ°** | ||
- λ³μ μ μΈλ¬Έ (`var x;`) μ€ν. | ||
- μλ³μ `x`λ <u>μ€ν 컨ν μ€νΈκ° κ΄λ¦¬νλ μ€μ½ν</u>μ λ±λ‘λκ³ , `undefined`λ‘ μ΄κΈ°νλλ€. | ||
- **μμ€μ½λ μ€ν** | ||
- λ³μ ν λΉλ¬Έ (`x = 1;`) μ€ν. | ||
- μ΄λ, xκ° μ μΈλ λ³μμΈμ§ νμΈνκΈ° μν΄ <u>μ€ν 컨ν μ€νΈκ° κ΄λ¦¬νλ μ€μ½ν</u>μ x λ³μκ° λ±λ‘λμ΄ μλμ§ νμΈνλ€. | ||
- μ μΈλ λ³μ(μ€μ½νμ λ±λ‘λ λ³μ)λΌλ©΄ κ°μ ν λΉνκ³ , ν λΉ κ²°κ³Όλ₯Ό <u>μ€ν 컨ν μ€νΈκ° κ΄λ¦¬νλ μ€μ½ν</u>μ λ±λ‘νλ€! |