DEV Community

Discussion on: What is the simplest code to explain a loop?

Collapse
 
nektro profile image
Meghan (she/her) • Edited

Do go off the book example:

class Book
  read() {
    for (const p of this.pages) {
      p.read();
    }
  }
}