The browser storage localStorage is not available. Either your browser does not support it or you have disabled it or the maximum memory size is exceeded. Without localStorage your solutions will not be stored.

do...while loop

The do...while loop works similarly to the while loop. The loop code is executed as long as the loop condition results in true. The only difference is that the loop condition is checked after the loop code. This ensures that the loop code is run through at least once.
var threeX = '';
do {
  threeX = threeX + 'x';
} while (threeX.length < 3);
After the loop threeX has the value 'xxx'.

Exercise

Write a function lcm that takes two natural numbers and calculates their least common multiple (lcm). The lcm of two natural numbers a und b is the smallest natural number that is divisible by a and b. lcm(4, 6) should return 12.