Number of integers to yield
Added to result
const a = [...count(5)]; // Yields five numbers: [0,1,2,3,4]
const b = [...count(-5)]; // Yields five numbers: [0,-1,-2,-3,-4]
for (const v of count(5, 5)) {
// Yields: 5, 6, 7, 8, 9
}
const c = [...count(5,1)]; // Yields [1,2,3,4,5]
Yields
amount
integers, counting by one from zero. If a negative amount is used, count decreases. Ifoffset
is provided, this is added to the return result.