Chapter 3 DynaScript Predefined Objects


Function properties

The Function object has this property:

length property

Syntax

Function.length 

Attributes

This property is read-only.

Description

Returns the number of parameters required by the Function.

Return

Integer.

Example

This example returns the number of parameters required by the function:

<!--SCRIPT
myFunc = new Function( "x","y", "return x * y;" );
document.WriteLn( "The function myFunc takes " + myFunc.length + " parameters." );
document.WriteLn( myFunc(5, 6) );
-->

 


Copyright © 1999 Sybase, Inc. All rights reserved.