✨Sequence
finite/infinite iterable of numbers
Last updated
Was this helpful?
finite/infinite iterable of numbers
Last updated
Was this helpful?
Was this helpful?
JS⟩ iteration ⟩ iterable ⟩ custom ⟩ Sequence
💾replit:(iterable) Sequence
// ⭐️ Sequence (iterable class)
//
// use cases:
// new Sequence() // 0, 1, 2, 3 ... (infinite)
// -------------------------------------------------------
class Sequence {
// 🔸 custom class type name
get [Symbol.toStringTag]() { return 'Sequence' }
*integers() - non-negative integers. ()