using while loop in javascript code example Example: javascript while loop while(condition) { //whatever }