Updated snippets
Mainly for better readability
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user