Exercise 4 · Chapter: ArraysRequired+50 XP
Find Biggest
Write a program that finds the biggest number in an array.
The first line of input tells you how many numbers there are. Then each following line has one number. Read all the numbers into an array, then print the biggest one.
Example input:
3 5 2 8
Example output:
8
Hint: Math.max(...numbers) gives the biggest number in the array.
Need a hint?
3 available · costs 5 XP each
javascript
Output
Run your code to see the output here.