CodesJava

Easy learning with example program codes

JavaScript math min() method

The JavaScript math min() method is used to get the minimum value from a set of numbers.
Syntax:

Math.min(n1,n2,...)

Parameters
n: It represents the set of numbers.

Returns
Minimum value from a set of numbers.

Example

<!DOCTYPE html>
<html>
<body>
<script>  
document.writeln(Math.min(20,50,4,30,40));  
</script>  
</body>
</html>

Output

4
Please follow and like us:
error








Copyright © 2019 CodesJava DMCA.com Protection Status