Node.js Tutorial

Node.js Loops

Loops

Loops let you repeat blocks of code efficiently.

for (const port of [3000, 3001]) console.log(port);
Try it Yourself