---
title: "Discussion on \"JS reduce\" | Hashnode"
description: "Discussion on \"JS reduce\". Returns single value.\nDoesn't mutate original array.\nDoesn't execute the function for empty array elements.\nSyntax: array.reduce(function(previousValue, currentValue, currentIndex, arr), initialValue);\n\n\npreviousValue: value resulting from the previo..."
url: "https://hashnode.com/posts/js-reduce/61c618c5f6c63f538e6f3a3b"
---

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

Discussion

# [JS reduce](https://vkglobal.hashnode.dev/js-reduce?utm_source=hashnode&utm_medium=feed)

Returns single value. Doesn't mutate original array. Doesn't execute the function for empty array elements. Syntax: array.reduce(function(previousValue, currentValue, currentIndex, arr), initialValue); previousValue: value resulting from the previo...

Dec 24, 2021 · 1 min read · vkglobal.hashnode.dev  
Updated Jan 17, 2022  
Read the article

-   [#functional-programming](https://hashnode.com/tag/functional-programming)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Mahesh](https://hashnode.com/@urstrulyvishwak)

@urstrulyvishwak · India

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

Dad | Web developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
