while or function javascript code example Example: javascript while loop while(condition) { //whatever }