alhassy / alhassy/JavaScriptCheatSheet

forEach does not modify the array

Open
#2 1 comment 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
No language data
Stars
221
Forks
23
PR merge metrics
No merged PRs in 30d

Description

In the subsection `Array Methods`:

> With the exception of `forEach`, the above functions do not modify the array they are given.

`forEach` behaves _exactly_ in the same manner as the rest of those functions. None of them, `forEach` included, modifies the original array.

(But also none of them can prevent that _you_ change it inside the iterating function)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.