Ad
Functional Programming
Declarative Programming
Programming Paradigms
Higher-order Functions
Functions
Control Flow
Basic Language Features
Fundamentals
Arrays
Data Types
Iterators
Object-oriented Programming
Code
Diff
  • // logic
    Number.prototype[Symbol.iterator] = function * (){
    for (let i=0;i<=this;i++) {
     yield i
    }
    
    }
    // you can use this to create your own range
    • // logic
    • Number.prototype[Symbol.iterator] = function * (){
    • for (let i=0;i<=this;i++) {
    • yield i
    • }
    • }
    • // logic
    • Number.prototype[Symbol.iterator] = function * (){
    • for (let i=0;i<=this;i++) {
    • yield i
    • }
    • }
    • // you can use this to create your own range