Updated snippets

Mainly for better readability
This commit is contained in:
Angelos Chalaris
2017-12-12 18:21:53 +02:00
parent 7758e59f0e
commit e2d2b6aa41
5 changed files with 12 additions and 14 deletions

View File

@ -4,8 +4,8 @@ Use `performance.now()` to get start and end time for the function, `console.log
First argument is the function name, subsequent arguments are passed to the function.
```js
const timeTaken = (f,...args) => {
var t0 = performance.now(), r = f(...args);
const timeTaken = (func,...args) => {
var t0 = performance.now(), r = func(...args);
console.log(performance.now() - t0);
return r;
}