---
title: "Discussion on \"Implenting Array.reduce() Method from scratch\" | Hashnode"
description: "Discussion on \"Implenting Array.reduce() Method from scratch\". // normal\narr.reduce(callbackfn, initialValue);\n// callback function with parameters\n// initialValue maybe 0 or whatever you can give \narr.reduce((previousValue, currentValue, currentIndex, array) => {\nconst nextValue = previousValue + currentValue;\n..."
url: "https://hashnode.com/posts/implenting-arrayreduce-method-from-scratch/66305fa267d3dea7332bb4b4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Implenting Array.reduce() Method from scratch](https://sagyr.hashnode.dev/implenting-arrayreduce-method-from-scratch?utm_source=hashnode&utm_medium=feed)

// normal arr.reduce(callbackfn, initialValue); // callback function with parameters // initialValue maybe 0 or whatever you can give arr.reduce((previousValue, currentValue, currentIndex, array) => { const nextValue = previousValue + currentValue; ...

Apr 30, 2024 · 1 min read · sagyr.hashnode.dev  
Read the article

## Written by

[sagyr](https://hashnode.com/@sagyr)

@sagyr · Bangalore

  
[View profile](https://hashnode.com/@sagyr)

frontend engineer

Frontend engineer with love for design

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
