💾range()
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
JS⟩ iteration ⟩ iterable ⟩ extension ⟩ range()
replit ⟩ Iterable (protocol)
// ⭐️ half-open range: [start, end)
function range(start, end, step = 1) {
// return an iterable
return {
*[Symbol.iterator]() {
for (let i = start; start