Returns the nth iterated value.
n
undefined
input iterator
iteration number
nth iterated value
var array2iterator = require( `@stdlib/array/to-iterator` ); var it = array2iterator( [ 0, 0, 1, 0, 0 ] ); var v = iterNth( it, 3 ); // returns 1
Returns the nth iterated value.
Notes
n
exceeds the total number of iterations, the function returnsundefined
.