Choose where you’d like to start

sqrt()

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> );
ParameterDescriptionData 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
 

Get Started Now

Execute