---
title: "random"
canonical: "https://support.appfire.com/space/PSJC/434507305/random"
format: markdown
---
> Macro (aura-html)


## Description

> Macro (excerpt)
> 
> Returns a random **int** value between 0 (inclusive) and the specified value (exclusive). This works for integers only.

Returns a random **int** value between 0 (inclusive) and the specified value (exclusive). This works for integers only.  
 

|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | random(number) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| number | Number | Yes | Number to get the random **int** value for. |

## Return Type

**Number**

## Example

```javascript
number a = random(4);
print("a= " + a);
```

Prints: a= 3;

## See also

> Macro (contentbylabel)