Lodash prototype.next method
语法
Gets the next value on a wrapped object following the iterator protocol.
输出
(Object) − Returns the next iterator value.
实例
var _ = require('lodash');
var wrapped = _([1, 2]);
console.log(wrapped.next());
console.log(wrapped.next());
Save the above program in
tester.js. Run the following command to execute this program.
Command
输出
{ done: false, value: 1 }
{ done: false, value: 2 }