Sass random() Function

You are Here:

Sass random() Function

The random() function returns a random decimal number between 0 and 1.

Example

SASS TO CSS CONVERTER
@debug random(); // 0.2821251853 @debug random(); // 0.6221325812

Syntax

random()

Return Value

ValueExplanation
NumberReturns a random decimal number between 0 and 1.

Sass random() Function using Parameter

If the parameter is a number greater than or equal to 1, returns a random whole number between 1 and parameter.

Example

SASS TO CSS CONVERTER
@debug random(10); // 6 @debug random(100); // 84

Reminder

Hi Developers, we almost covered 99.1% of Sass Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in Sass.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author