Travis build: 1383

This commit is contained in:
30secondsofcode
2018-01-24 11:51:58 +00:00
parent b51bee9022
commit f4888078d4
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
```