I would probably write it as:

```js
while (difference--) {
  dot = document.createElement('div');
  dot.className = 'icon-dot';
  element.appendChild(dot);
}
```

http://blog.millermedeiros.com/why-i-favor-while-loops/