sqrt()
Table of Contents
Overview
The sqrt() function takes a number as an argument, and returns the square root of that number.
Return Type
- Decimal
Syntax
<variable> = <number>.sqrt();
(OR)
<variable> = sqrt(<number> );
Parameter | Description | Data type |
---|---|---|
<variable> | Variable which will contain the returned value. | DECIMAL |
<number> | The number whose square root will be returned. Values below 0 will return null. | NUMBER or DECIMAL |
Examples
number = 9;
sqrtValue = number.sqrt(); // returns 3.0
sqrtValue = number.sqrt(); // returns 3.0