JavaScript Number parseFloat() method

The JavaScript number parseFloat() method is used to convert a string into a floating point number. It will throw NaN exception if specified can not be converted into a float number. Syntax: Number.parseFloat(string) Parameters string: It represents the string that has to be converted into a floating point number. Returns Floating point number. Example: <!DOCTYPE … Read more

JavaScript Number isInteger() method

The JavaScript number isInteger() method is used to find whether a number is an integer number or not. Syntax: Number.isInteger(n) Parameters n: It represents the number on which integer checks have to be informed. Returns It returns true if the specified number is an integer number otherwise returns false. Example: <!DOCTYPE html> <html> <body> <script> … Read more

JavaScript Number isFinite() method

The JavaScript number isFinite() method is used to find whether a number is a finite number or not. Syntax: Number.isFinite(n) Parameters n: It represents the number on which finite checks have to be informed. Returns It returns true if the specified number is a finite number or not. Example: <!DOCTYPE html> <html> <body> <script> var … Read more

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 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>