[펌글] 자바스크립트 arguments.callee와 arguments.caller 에 대하여

By | 12월 22, 2011

- 출처 : http://dancer.tistory.com/53 -

arguments.callee

This property is a reference to the function that you are in. Which is very handy if you want to get a reference to an anonymous function from inside itself. One good reason for doing this would be in a recursive anonymous function.

arguments.caller

This property is a reference to the function that called the function you are in. This allows you to get access to the entire current callstack which is very handy for debugging.

*  caller를 구할 때 arguments.caller 로 구하니까 실패했다가 arguments.callee.caller 로 구하니 성공하였다.
   원래 용법이 이건가?

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments