use regular set 0 for aesthetics

This commit is contained in:
Baipyrus 2023-12-09 19:59:06 +01:00
parent a0b9c210e6
commit f59e1530a5
2 changed files with 4 additions and 4 deletions

View File

@ -12,8 +12,8 @@ const maps = input.slice(1).map((a) => {
const [_, L, R] = mapping;
return { name, mapping: { L, R } };
});
let count,
index = (count = 0);
let count = 0,
index = 0;
let current = maps.find((e) => e.name === "AAA");
while (current.name !== "ZZZ") {
const direction = instructions[index];

View File

@ -12,8 +12,8 @@ const maps = input.slice(1).map((a) => {
const [_, L, R] = mapping;
return { name, mapping: { L, R } };
});
let count,
index = (count = 0);
let count = 0,
index = 0;
let current = maps.find((e) => e.name === "AAA");
while (current.name !== "ZZZ") {
const direction = instructions[index];