plus
Description
Adds two numbers or concat it if one of the operands is a string.
Input / Parameter
value1
The first value to add/concat.
Number/Text/String
-
-
No
value2
The second value to add/concat.
Number/Text/String
-
-
No
Output
Returns the sum/concatenation of the two values.
Number/Text/String
Example
In this example, we will use function plus to concat a number and a string
Steps
Drag a
buttoncomponent into the canvas and open theActiontab. Select thepressevent of the button and drag theconsolefunction to the event flow, and change the param type ofvalueparam to subflow/function.Drag the
plusfunction into the subflow, enter the 2 values to be added/concat together. For this example they are1forvalue1andresultforvalue2.
Results
Now click the button in preview, check the console, you will the result
1result.
Links
Related Information
Last updated