Thursday, May 26, 2011

squareRoot() method

The squareRoot() method returns the square root of a specified number. To display the result, add the object "num_sqrt" to your coding line.

Browser support: all
TheMadScript Version: 2.0.0

Syntax: squareRoot(number,result);

The below syntax finds the square root of 16 and displays the result in an alert box:

squareRoot(16,"box_alert(num_sqrt)");

No comments:

Post a Comment