Client Function Template: Difference between revisions
(Created page with "{{ClientSide}} This is an example description for a client-side function template. == Syntax == <syntaxhighlight lang="javascript"> example.func(arg1, arg2, arg3); </syntax...") |
No edit summary |
||
| Line 13: | Line 13: | ||
* '''arg2''': Explanation of second example argument, parameter should be in <span style="color: #408DAE"><b>int</b></span> type. | * '''arg2''': Explanation of second example argument, parameter should be in <span style="color: #408DAE"><b>int</b></span> type. | ||
* '''arg3''': Explanation of third example argument, parameter should be in <span style="color: #408DAE"><b>double</b></span> type. | * '''arg3''': Explanation of third example argument, parameter should be in <span style="color: #408DAE"><b>double</b></span> type. | ||
=== Returned Values === | |||
* <span style="color: #408DAE"><b>true</b></span>: if the example function has been executed successfully. | |||
* <span style="color: #408DAE"><b>false</b></span>: otherwise. | |||
== Multiple Syntaxes == | |||
<syntaxhighlight lang="javascript"> | |||
//Syntax I | |||
example.func(arg1, arg2, arg3); | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="javascript"> | |||
//Syntax II | |||
example.func(arg1, arg2, arg3, arg4[]); | |||
</syntaxhighlight> | |||
=== Parameters === | |||
* '''arg1''': Explanation of example argument, parameter should be in <span style="color: #408DAE"><b>string</b></span> type. | |||
* '''arg2''': Explanation of second example argument, parameter should be in <span style="color: #408DAE"><b>int</b></span> type. | |||
* '''arg3''': Explanation of third example argument, parameter should be in <span style="color: #408DAE"><b>double</b></span> type. | |||
* '''arg4''': Explanation of fourth example argument, parameter should be in <span style="color: #408DAE"><b>array</b></span> type. | |||
=== Returned Values === | === Returned Values === | ||
| Line 24: | Line 47: | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
//Syntax I | |||
let val = example.func("Washington", 1, 2.0); | let val = example.func("Washington", 1, 2.0); | ||
</syntaxhighlight> | |||
<syntaxhighlight lang="javascript"> | |||
//Syntax II | |||
let val = example.func("Washington", 1, 2.0, ['foo', 'bar']); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 23:32, 4 February 2018
Client-Side
This is an example description for a client-side function template.
Syntax
example.func(arg1, arg2, arg3);
Parameters
- arg1: Explanation of example argument, parameter should be in string type.
- arg2: Explanation of second example argument, parameter should be in int type.
- arg3: Explanation of third example argument, parameter should be in double type.
Returned Values
- true: if the example function has been executed successfully.
- false: otherwise.
Multiple Syntaxes
//Syntax I
example.func(arg1, arg2, arg3);
//Syntax II
example.func(arg1, arg2, arg3, arg4[]);
Parameters
- arg1: Explanation of example argument, parameter should be in string type.
- arg2: Explanation of second example argument, parameter should be in int type.
- arg3: Explanation of third example argument, parameter should be in double type.
- arg4: Explanation of fourth example argument, parameter should be in array type.
Returned Values
- true: if the example function has been executed successfully.
- false: otherwise.
Examples
This is a basic explanation about what does the example below do.
//Syntax I
let val = example.func("Washington", 1, 2.0);
//Syntax II
let val = example.func("Washington", 1, 2.0, ['foo', 'bar']);