Home
Topics
Practice
Roadmap
DSA Tracker
Code Editor
Tech Blogs
More
Sign in
Get started
Loading question...
Feedback
Implement Array.prototype.reduce
Medium
00:00
0 users online
Share
Description
Solution
Submissions
Discussion
Write your own array reduce implementation.
Sample Input:
[1, 2, 3, 4]
Sample Output:
10
Hints
Hint 1
Handle the initial value parameter
Hint 2
Iterate through the array
Hint 3
Accumulate the result using the callback
Code Editor
Reset
Run
Save
Loading...