Parameters or Arguments
number The wide variety used to calculate the rectangular root. The quantity should no longer be a cost that is larger than or equal to zero
The sqrt() feature returns the rectangular root of a number.
If the range is a terrible number, the sqrt() function will return NaN.
Math is a placeholder object that contains mathematical features and constants of which sqrt() is one of these functions.
console.log(Math.sqrt(25)); console.log(Math.sqrt(3)); console.log(Math.sqrt(-9));
In this example, we have invoked the sqrt() function the usage of the Math class.
We have written the output of the sqrt() feature to the internet browser console log, for demonstration purposes, to exhibit what the sqrt() feature returns.
The following will be output to the net browser console log:
5 1.7320508075688772 NaN
In this example, the first output to the console log lower back 5 which is the rectangular root of 25.
The 2nd output to the console log back 1.7320508075688772 which is the square root of 3
The 0.33 output to the console log again NaN because the price -9 is a bad number.