how to make for loop in javascirpt code example Example: how to do a for loop in js for (let i = 0; i < 10; i++) { console.log(i); }