Added min max
This commit is contained in:
14
uebung3/min-max.html
Normal file
14
uebung3/min-max.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title>Min-Max</title>
|
||||
</head>
|
||||
|
||||
<script>
|
||||
|
||||
let arr = Array.from({length: 10}, () => Math.floor(Math.random() * 1));
|
||||
document.write(arr);
|
||||
document.write("Minimum: " + arr.min());
|
||||
document.write("Maximum: " + arr.max());
|
||||
</script>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user