using an if else statement within a while loop in javascript code example Example: while loops js while (10 > 1) { console.log("HI"); }