A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/javascript/Function/caller below:

caller ยท WebPlatform Docs

caller Summary

Gets the function that invoked the current function.

Syntax
functionName.caller
Examples

The following example illustrates the use of the caller property:

function CallLevel(){
    if ( CallLevel.caller == null)
       return("CallLevel was called from the top level.");
    else
       return("CallLevel was called by another function.");
 }

 document.write(CallLevel());

 
Remarks

The functionName object is the name of any executing function.

The caller property is defined for a function only while that function is executing. If the function is called from the top level of a JavaScript program, caller contains null.

If the caller property is used in a string context, the result is the same as functionName.toString , that is, the decompiled text of the function is displayed.

See also Other articles Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4