Explain Collection Functions in Underscore.js.list some under collection functions in Underscore.js?

devquora
devquora

Posted On: Feb 22, 2018

 

Collection Functions are functions that work on arrays, objects, and array-like objects such as arguments, NodeList and similar.Below is the list of some collection functions in Underscore.js.

Function name     Prototype
each         :  _.each(list, iteratee, [context])
map          :  _.map(list, iteratee, [context])
find         :  _.find(list, predicate, [context])
filter       :  _.filter(list, predicate, [context]) 
reject       : _.reject(list, predicate, [context])

Readmore from http://underscorejs.org/#collections

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Underscore.js Interview Questions

    Describe Underscore.js is ?

    Underscore.js is a javascript library that provides helper functions to manipulate an object without extending code any ..

    Underscore.js Interview Questions

    How to check an element exists or not in an array in Underscore.js?

    _.contains method is used to check an element in array exists or not in Underscore.js. Prototype : _.contains(list, valu..