Salesforce B2C Commerce 23.5 > B2C Commerce API > B2C Commerce Script > TopLevel
TopLevel
Class Function
Object
Function
The Function class represent a JavaScript function.
Properties
length  :  Number
The number of named arguments that were specified when the function was declared.
prototype  :  Object
An object that defines properties and methods shared by all objects created with that constructor function.
Constructor Summary
Function(args : String...)
Constructs the function with the specified arguments where the last argument represents the function body and all preceeding arguments represent the function parameters.
Method Summary
apply(thisobj : Object, args : Array) : Object
Invokes this function as a method of the specified object passing the specified Array of arguments.
call(thisobj : Object, args : Object...) : Object
Invokes this function as a method of the specified object passing the specified optional arguments.
toString() : String
Returns a String representation of this function object.
Methods inherited from class Object
Constructor Detail
Function
public Function(args : String...)
Constructs the function with the specified arguments where the last argument represents the function body and all preceeding arguments represent the function parameters.
Parameters:
args - one or more Strings where the last argument in the list represents the function body and all preceeding arguments represent the function parameters.

Method Detail
apply
apply(thisobj : Object, args : Array) : Object
Invokes this function as a method of the specified object passing the specified Array of arguments.
Parameters:
thisobj - the object to which the function is applied.
args - Array of values or an arguments object to be passed as arguments to the function.
Returns:
whatever value is returned by the invocation of the function.

call
call(thisobj : Object, args : Object...) : Object
Invokes this function as a method of the specified object passing the specified optional arguments.
Parameters:
thisobj - the object to which the function is applied.
args - an optional list of one or more arguments values that are passed as arguments to the function.
Returns:
whatever value is returned by the invocation of the function.

toString
toString() : String
Returns a String representation of this function object.
Returns:
a String representation of this function object.

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.