Table of Contents
- Sample code with explanation of sqrt()
- Limitations and Caveats
- Other Related Concepts
Parameters:# - A number or an array storing a number.
Return Value:The square root of the parameter. Sqrt() returns NaH is few cases we discuss them later in the tutorial.
Or in case you are looking to write it to your webpage:
We are passing the value within the function and the square root is returned.
- When a negative number is passed as a parameter the function return NaH
- Arrays with one number work fine, however, for instances where an array contains more than one number NaH is returned. A method to overcome this is to create a function that runs square root in the value individually and then return it
- Strings and empty parameters also return NaH when passed
- And lastly, empty arrays return 0