Variables

Learn how to create a variable, store data and reuse parameters

Declare Variable
Declare Variable

To create or declare a variable use . You just need to specify the variable name (identifier) and its value.

Variable Type

There are 3 type:

  • Number: Use for number parameter.
  • String: Use for any text parameter.
  • Reference: You can write any valid expression in here.
Variable Naming Rule
  • Variable name must only contain alphanumeric: a-z, A-Z, 0-9 and underscore _
  • Cannot start with a number: foo123 - valid, 123foo - invalid
Naming Convention

Generally, you can name your Variable however you like. But by convection we usually use Camel Case.

The first character is in lowercase, the first character of each word follow that is uppercase: topRegion, middlePoint, someLongVariableName, etc...

Set Variable
Set Variable

To set a variable use

Select the variable you want and the value to set

Where can I use variable?
Declare Variable

Technically, everywhere.

Any input fields that allow you to change parameters, you can use Variable.

In the screenshot, every parameters of a Click is replaced with Variable.

Code Equivalent

    var name = "hello" //create a variable called name with value "hello" string
    name = "world" //set the variable to different value

© 2024 - Macrorify by KoK-CODE