> For the complete documentation index, see [llms.txt](https://pasahu1805.gitbook.io/javascrit-jquery/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pasahu1805.gitbook.io/javascrit-jquery/undefined-2/undefined-6.md).

# 화살표 함수

### 화살표 함수(선언적 함수)

```javascript
func1 = () => {
    document.write("1. 함수가 실행되었습니다.<br>");
}
func1()
```

### 화살표 함수(익명 함수)

```javascript
let func2 = () => {
    document.write("2. 함수가 실행되었습니다<br>");
}
func2();
```

### 화살표 함수(리턴문 함수)

```javascript
let func3 = () => {
    let str = "3. 함수가 실행되었습니다.<br>";
    return str;
}
let result = func3();
document.write(result);
```

### 화살표 함수(매개변수가 있는 함수 > 함수 + 리턴 + 익명)

```javascript
let func4 = (str) =>{
    return str;
}
let result2 = func4("4. 함수가 실행되었습니다.<br>");
document.write(result2);
```

### 화살표 함수(괄호 생략)

```javascript
let func5 = str =>{
    return str;
}
let result3 = func5("5. 함수가 실행되었습니다.<br>");
document.write(result3);
```

### 화살표 함수(괄호 + 리턴 생략)

```javascript
let func6 = str => str
        
let result4 = func6("6. 함수가 실행되었습니다.<br>");
document.write(result4);
```
