> 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-13./13.6.md).

# 13.6 변수로서의 함수

* 함수를 가리키는 녀수를 만들어 별명을 정할 수 있음
* 배열에 함수를 허을 수 있음
* 함수를 객체의 프로퍼티로 사용할 수 있음
* 함수를 함수에 전달할 수 있음
* 함수가 함수를 반환할 수 있음
* 함수를 매개변수로 받는 함수를 반환할 수 있음

<예제>

```javascript
function addThreeSquareAddFiveTakeSquareRoot(x) {
    return Math.sqrt(Math.pow(x+3, 2)+5);
}

// 별명을 쓰기 전
const answer = (addThreeSquareAddFiveTakeSquareRoot(5) + addThreeSquareAddFiveTakeSquareRoot(2)) / addThreeSquareAddFiveTakeSquareRoot(7);

// 별명을 쓴 후
cost f = addThreeSquareAddFiveTakeSquareRoot;
const answer = (f(5) + f(2)) / f(7);
```
