Solution 1

var sr = Math.sqrt(9)

Solution 2

Solution 3

References

http://www.math.com/school/subject1/lessons/S1U1L9DP.html