Underscore.js _.each() Function (original) (raw)

Last Updated : 25 Nov, 2021

Underscore.js is a JavaScript library that provides a lot of useful functions that helps in the programming in a big way like the map, filter, invoke etc even without using any built-in objects.
The _.each() function is an inbuilt function in Underscore.js library of JavaScript which is used to return the each element of the given list.
Syntax:

_.each(list, function)

Parameters: It accepts two parameters which are specified below:

Return values: It returns each element of the list.
JavaScript code to show the working of this function:

javascript

javascript

javascript

Hi Geeks Hi Geeks Hi Geeks

Similar Reads

Underscore.js Collections Functions
















Underscore.js Arrays Functions
















Underscore.js Functions















Underscore.js Object Functions
















Underscore.js Utility Functions















Underscore.js Questions