Skip to content

Commit 3e4e5f9

Browse files
committed
Use const where possible
1 parent 41185ef commit 3e4e5f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

JavaScript/2-speed.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ let fib = n => (
2121
);
2222

2323
function speedTest(name, fn, args, count) {
24-
let start = new Date().getTime();
24+
const start = new Date().getTime();
2525
for (let i = 0; i < count; i++) {
2626
fn(...args);
2727
}
28-
let end = new Date().getTime();
29-
let time = end - start;
28+
const end = new Date().getTime();
29+
const time = end - start;
3030
console.log(`${name} * ${count} : ${time}`);
3131
}
3232

0 commit comments

Comments
 (0)