---
title: "Discussion on \"_.each and forEach in JS\" | Hashnode"
description: "Discussion on \"_.each and forEach in JS\". _.each()\n'_.each()' is used to traverse/iterate through each element in a list.\nInstall Underscore package for using _.each\nnpm install underscore\n\nImporting in nodejs Package\n// npm install underscore\nconst _= require('underscore')\n\nSyntax\n_.each(li..."
url: "https://hashnode.com/posts/each-and-foreach-in-js/6091565a763ca93033366a72"
---

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

Discussion

# [\_.each and forEach in JS](https://hashnode.pratikpathak.com/each-and-foreach-in-js?utm_source=hashnode&utm_medium=feed)

\_.each() '\_.each()' is used to traverse/iterate through each element in a list. Install Underscore package for using \_.each npm install underscore Importing in nodejs Package // npm install underscore const \_= require('underscore') Syntax \_.each(li...

May 4, 2021 · 1 min read · hashnode.pratikpathak.com  
Updated Jan 2, 2024  
Read the article

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

## Written by

[Pratik Pathak](https://hashnode.com/@pratikpathak)

@pratikpathak

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
