Linting
This commit is contained in:
@ -6,8 +6,8 @@ Use `console.time()` and `console.timeEnd()` to measure the difference between t
|
||||
|
||||
```js
|
||||
const timeTaken = callback => {
|
||||
console.time('timeTaken'); const r = callback();
|
||||
console.timeEnd('timeTaken'); return r;
|
||||
console.time('timeTaken'); const r = callback();
|
||||
console.timeEnd('timeTaken'); return r;
|
||||
};
|
||||
// timeTaken(() => Math.pow(2, 10)) -> 1024
|
||||
// (logged): timeTaken: 0.02099609375ms
|
||||
|
||||
Reference in New Issue
Block a user