Home
Topics
Practice
Roadmap
DSA Tracker
Code Editor
Tech Blogs
More
Sign in
Get started
Loading question...
Feedback
Find Largest Number in Array
Easy
00:00
0 users online
Share
Description
Solution
Submissions
Discussion
Write a function that finds the largest number in an array.
Sample Input:
[1, 5, 3, 9, 2]
Sample Output:
9
Hints
Hint 1
You can use Math.max() with spread operator
Hint 2
Or loop through the array and track the maximum
Hint 3
Handle empty arrays if necessary
Code Editor
Reset
Run
Save
Loading...