> For the complete documentation index, see [llms.txt](https://april.gitbook.io/learning-js/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://april.gitbook.io/learning-js/chapter-6./6.7.md).

# 6.7 화살표 표기법

* function이라는 단어와 중괄호 숫자를 줄이려고 고안된 단축 문법
* 익명 함수를 만들어 다른곳에 전달할 때 가장 유용

### &#x20;화살표 함수의 세 가지 단축 문법

* function을 생략해도 된다.
* 함수에 매개변수가 하나뿐이라면 괄호(())도 생략할 수 있다.
* 함수 바디가 표현식 하나라면 중괄호와 return 문도 생갹할 수 있다.

```javascript
const f1 = function() { return "Hello!"; }
// 또는 
const f1 = () => "Hello!";

const f2 = function(name) { return "Hello!" + name; }
// 또는
const f2 = name => "Hello!" + name;

const f3 = function(a, b) { return a + b; }
// 또는
const f3 = (a, b) => a + b;
```
