DCSIMG
JavaScript Callee property - Pini Dayan

Pini Dayan

The best thing about a boolean is even if you are wrong, you are only off by a bit.

JavaScript Callee property

Hi all,

It always amazes me how I discover another JavaScript feature I wasn’t aware of. The feature I want to discuss here in this post is the Callee property we have from the arguments property we have when we are in a function scope.

This property will return the current function being executed right now. In addition we have the caller property that we can use to get a reference to the calling function.Imagine you could even do crazy stuff like getting the caller function and its argument by doing something like:

arguments.callee.caller.arguments[0].

Here for example we are doing something nice:

image

Not every browser support this property although it was omitted by ECMA

Comments

Rotem Bloom said:

חזרת בגדול אהההה

סחטיין אחי אחלה של פוסט

# January 29, 2012 3:12 PM

Pini Dayan said:

חזרתי בקטן :-)

# February 1, 2012 4:20 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: