JavaScript Math min() method18 Mar 2025 | 1 min read The JavaScript math min() method compares the given numbers and returns the minimum value. SyntaxThe min() method is represented by the following syntax: Parameternum1,num2,...,numN - Numbers to be compared.. ReturnA minimum value of the given numbers. JavaScript Math min() method exampleHere, we will understand min() method through various examples. Example 1Let's see a simple example to print the minimum value of the given numbers. Output: 12 -24 Example 2Let's see an example to print the minimum value of the given array. Output: 9 Next TopicJavaScript Math |
JavaScript The JavaScript math atan() method returns the arctangent of the given number in the form of radians. The value returned by atan() method lies between -Math.PI/2 to Math.PI/2. Syntax The atan() method is represented by the following syntax: Math.atan(num) Parameter num - A number. Return The arctangent of the number. JavaScript ...
1 min read
JavaScript The JavaScript math log() method returns the natural logarithm of the given number i.e. base e. If the number is negative, it returns NaN. Syntax The log() method is represented by the following syntax: Math.log(num) Parameter num - A number. Return The natural logarithm of a number. JavaScript example Here, we will...
1 min read
JavaScript The JavaScript math ceil() method increases the given number up to the closest integer value and returns it. If the given number is already an integer, the ceil() method returns it directly. Syntax The ceil() method is represented by the following syntax: Math.ceil(num) Parameter num - A number. Return A smallest...
1 min read
JavaScript The JavaScript math sin() method returns the sine of the given number. The value returned by sin() method ranges between -1 to 1, which represents the sine of the angle. Syntax The sin() method is represented by the following syntax: Math.sin(num) Parameter num - A number. Return The sine of the...
1 min read
JavaScript The JavaScript math random() method returns the random number between 0 (inclusive) and 1 (exclusive). Syntax The random() method is represented by the following syntax: Math.random() Return The random number between 0 (inclusive) and 1 (exclusive). JavaScript example Here, we will understand random() method through various examples. Example 1 Let's see an...
1 min read
JavaScript The JavaScript math tan() method returns the tangent of the given number that represents the tangent of an angle. Syntax The tan() method is represented by the following syntax: Math.tan(num) Parameter num - A number. Return A number that represents the tangent of the angle. JavaScript example Here, we will understand tan()...
1 min read
JavaScript The JavaScript math hypot() method returns the square root of sum of the squares of given numbers. It returns NaN, if any argument cannot be converted to a number. Syntax The hypot() method is represented by the following syntax: Math.hypot([num1[, num2[, ...]]]) Parameter Num - A number. Return The square root...
1 min read
JavaScript The JavaScript math round() method rounds up the given number up to the closest integer value and returns it. If the given number is already an integer, the round() method returns it directly. Syntax The round() method is represented by the following syntax: Math.round(num) Parameter num - A number. Return The...
1 min read
JavaScript The JavaScript math cbrt() method returns the cube root of the given number. Unlike sqrt() method, this method accepts negative number. Syntax The cbrt() method is represented by the following syntax: Math.cbrt(num) Parameter num - A number. Return The cube root of the given number. JavaScript example Here, we will understand cbrt()...
1 min read
JavaScript The JavaScript math cosh() method returns the hyperbolic cosine of the given number. Syntax The cosh() method is represented by the following syntax: Math.cosh(num) Parameter num - A number. Return The hyperbolic cosine of a number. JavaScript example Here, we will understand cosh() method through various examples. Example 1 Let's see a simple example...
1 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India