# generateRandom

generateRandom() function is the Standard function available in 200OK.

**Description** : The generateRandom function generates a random decimal number within the specified range, defined by the parameters x and y.

**Syntax** :   fx\_generateRandom()

**Example :** fx\_generateRandom(1, 10) would yield a random decimal number between 1 and 10 as the result.

Here we go with simple scenario using the above function.

**Scenario** : A game developer is creating a virtual dice rolling feature for a board game application. They utilize a function to generate a random number within the range of 1 to 6, simulating the roll of a six-sided die.

**Request Side** :&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/VlGft8-7w5BqVVQBZAoCbqlMQb14_r-yVKpFENcJdbpzxlXpzgDHvHuMZFuVVSgY7C7muZIxeVKbn-S1czKLCdUqURHudfoguVbQlauFuyqqQhTPaQ-lFpZme4_OY-Y0Npg_DGFT7U9npgnex-Qbuoc" alt=""><figcaption><p>Passing the value inside the function</p></figcaption></figure>

**Response Side** :&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/zU_g5r_aiIQinglWlCSjBz3x7R2ZJC3hGTJatJcU0FVSZF1fYTf7hSaU5MT-6swm3eovVUklieInJlR15oRRAaf_Nk1yVl90p_JOoy21VILIB446V9wwjpVGj7d8Us5IaRk4l497wewWYlvG5F1nN_o" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-us.googleusercontent.com/Yty7YJ2nvbpfzwFva78iJrq7jTZEBp2dCNdJtcgw2dPmxiRlVTmMXdCklLWIsERtWJEFRlCGH0INXEhgIdsMrXlAZKQ5_1cEHcxP5rk5-7o8tWVGs5fuT3NXvdfAtxERY9aF-xL3gz9MXHYuXehvcmw" alt=""><figcaption></figcaption></figure>
