Created
May 17, 2025 17:00
-
-
Save davidystephenson/56e7f290cdf2ce65d65a23d383f28613 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 4. Write a program to find maximum number in a numeric array. | |
console.log("\n-------------------------------------------------\n"); | |
var numbers = [0, 100, 5] | |
var maximum = numbers[0] | |
for (var number of numbers) { | |
if (number > maximum) { | |
maximum = number | |
} | |
} | |
console.log(maximum) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment