JavaScript math tanh() method

The JavaScript math tanh() method is used to get the hyperbolic tangent of a number. Syntax: Math.tanh(n) Parameters n: It represents the number whose hyperbolic tangent has to be get. Returns The hyperbolic tangent of a number. Example: <!DOCTYPE html> <html> <body> <script> document.writeln(Math.tanh(1)); </script> </body> </html>

JavaScript math sqrt() method

The JavaScript math sqrt() method is used to get the square root of a number. Syntax: Math.sqrt(n) Parameters n: It represents the number whose square root have to be get. Returns Square root value of a number. Example <!DOCTYPE html> <html> <body> <script> document.writeln(Math.sqrt(625)); </script> </body> </html><!DOCTYPE html> <html> <body> <script> document.writeln(Math.sqrt(625)); </script> </body> </html> … Read more

JavaScript math round() method

The JavaScript math round() method is used to get the closest integer value of a number. Syntax: Math.round(n) Parameters n: It represents the number whose closest integer value has to be got. Returns Closest integer value of a number. Example: <!DOCTYPE html> <html> <body> <script> document.writeln(Math.round(45.7864)); </script> </body> </html>

JavaScript Math pow()

The JavaScript math pow() method is used to get the value of base to the power of an exponent. Syntax: Math.pow(base,exponent) Parameters base: It represents the base number. exponent: It represents the exponent to which the base has to raise. Returns Base value to the power of exponent. Example: <!DOCTYPE html> <html> <body> <script> document.writeln(Math.pow(2,4)); … Read more