24.84. Function.call( ): invoke a function as a method of an objectECMAScript v324.84.1. Synopsisfunction.call(thisobj, args...) 24.84.1.1. Arguments
24.84.1.2. ReturnsWhatever value is returned by the invocation of function. 24.84.1.3. Throws
24.84.2. Descriptioncall( ) invokes the specified function as if it were a method of thisobj, passing it any arguments that follow thisobj in the argument list. The return value of call( ) is the value returned by the function invocation. Within the body of the function, the this keyword refers to the thisobj object, or to the global object if thisobj is null. Use Function.apply( ) instead if you want to specify the arguments to pass to the function in an array. 24.84.3. Example// Call the default Object.toString( ) method on an object that // overrides it with its own version of the method. Note no arguments. Object.prototype.toString.call(o); 24.84.4. See AlsoFunction.apply( ) |