Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

Function

The Function object is associated with any function in JavaScript.

function findAverage(a,b,c) { return (a + b + c) / 3; } document.write( findAverage(4,7,9) ); Use the "new Function()" constructor if your script requires dynamically supplied executable code in the current scope of your script. var findAverage = new Function("a","b","c","return (a + b + c) / 3"); document.write( findAverage(4,7,9) );

Properties

length - returns the number of arguments expected by the function.

JavaScript

Objects

ArgumentsArrayAudioBooleanDataTransferDateDocumentElementFunctionGlobalHistoryHTMLElementMathNavigatorNumberObjectRegExpScreenStorageStringWindowXMLHttpRequest