Merge remote-tracking branch 'origin/master'

This commit is contained in:
Angelos Chalaris
2018-01-24 13:59:58 +02:00
3 changed files with 39 additions and 3 deletions

View File

@ -9,11 +9,11 @@ Omit the last argument, `context`, to use an `undefined` object (or the global o
const times = (n, fn, context = undefined) => {
let i = 0;
while (fn.call(context, i) !== false && ++i < n) {}
}
};
```
```js
var output = '';
times(5, i => output += i);
times(5, i => (output += i));
console.log(output); // 01234
```