Underscore.js _.iterators.List() Method Last Updated : 18 Aug, 2020 Comments Improve Suggest changes Like Article Like Report With the help of _.iterators.List() method, we can get the iterator which when called up gives the next value of the List by using this method. Syntax : _.iterators.List(array:Array) Parameters value: This method accepts a single parameter as mentioned above and described below: array: It holds the array where the method will be applied. Return: Return the iterator for a List. Example 1: In this example, we can see that by using _.iterators.List(array:Array) method, we are able to get the iterator which is invoked every time we call the iterator and return values of the List when called. JavaScript // Defining underscore contrib variable var _ = require('underscore-contrib'); var gfg = _.iterators.List(["Geeks", "for", "Geeks"]); for(var i = 0; i < 3; i++) { console.log(gfg()); } Output : Geeks for Geeks Example 2 : JavaScript // Defining underscore contrib variable var _ = require('underscore-contrib'); var gfg = _.iterators.List(["A", "B", "C", "D", "E"]); for(var i = 0; i < 3; i++) { console.log(gfg()); } Output : A B C D E Comment More infoAdvertise with us Next Article Underscore.js _.iterators.List() Method J jitender_1998 Follow Improve Article Tags : JavaScript Web Technologies JavaScript - Underscore.js Similar Reads Underscore.js _.iterators.K() Method With the help of _.iterators.K() method, we can get the function which when called generate a value from the given value by using this method. Syntax: _.iterators.K(value) Parameter: This method accepts a single parameter as mentioned above and described below: value: This parameter holds the given 1 min read Underscore.js _.iterators.map() method With the help of _.iterators.map() method, we can get the function of the new iterator which will return the value of the unary function which uses the values of the List iterator by using this method. Syntax: _.iterators.map(iter, unaryFn) Return: Return the value from the new iterator function. I 2 min read Underscore.js _.iterators.mapcat() Method With the help of _.iterators.mapcat() method, we can get the function iterator which when called return the value which is  flattening the contents of iterator and combined with the unary function by using this method. Syntax: _.iterators.mapcat(iter, unaryFn) Parameters: This method accepts two par 2 min read Underscore.js _.iterators.take() method With the help of _.iterators.take() method, we can get the values from the iteration function starting from 1 to the numberToTake variable and return a value whenever the iteration function is invoked by using this method. Syntax: _.iterators.take(iter, numberToTake) Return: Return the value from th 1 min read Underscore.js _.iterators.drop() method With the help of _.iterators.drop() method, we can get the values whenever we call the iterator but drops the values till the numberToDrop value and return the generated value by using this method. Syntax: _.iterators.drop(iter, numberToDrop) Return: Return the values by the iterator after dropping 1 min read Like