mirror of
https://github.com/Baipyrus/AoC-23.git
synced 2024-12-26 03:51:45 +00:00
save result in variable
This commit is contained in:
parent
a5b9f37f36
commit
e1631e5415
@ -79,7 +79,8 @@ while (open.length > 0) {
|
||||
open.push(next);
|
||||
}
|
||||
}
|
||||
console.log(closed.sort((a, b) => b.distance - a.distance)[0].distance);
|
||||
const furthest = closed.sort((a, b) => b.distance - a.distance)[0];
|
||||
console.log(furthest.distance);
|
||||
|
||||
const t1 = performance.now();
|
||||
console.log(`Runtime: ${t1 - t0}ms`);
|
||||
|
Loading…
Reference in New Issue
Block a user