# Variables

{% embed url="<https://youtu.be/wD1-co3Pejg>" %}

1. Navigate to the **Global Variables** tab in the sidebar.
2. Click the **Create New** button.
3. In the dialog box, enter a **Name** for the variable (e.g., userName).
4. Select the **Type** from the dropdown menu (Text, Json, or JavaScript).
5. Enter the **Value** or script code corresponding to your selected type.
6. Click **Create** to save the new global variable.

#### Types of variables supported

1. **Text Variable**

**Example:**

**Name:** userName

**Type:** Text

**Value:** John Doe

2. **JavaScript Variable**

**Example:**

**Name:** randomEmail

**Type:** JavaScript

**Value:** A custom function to generate dynamic data.

```javascript
async function() {
  function generateRandomEmail() {
    const randomFiveDigit = Math.floor(10000 + Math.random() * 90000);
    return `john${randomFiveDigit}@gmail.com`;
  }
  return generateRandomEmail();
}
```

3. **JSON Variable**

**Example:**

**Name:** office\_location

**Type:** Json

**Value:** A structured data object.

```json
{
  "lat": 12,
  "long": 75
}
```
