advent of code 2023 day 5: cleanup log var

This commit is contained in:
Wouter Groeneveld 2023-12-05 14:18:37 +01:00
parent 3de76649c8
commit fa5081bb59
1 changed files with 0 additions and 1 deletions

View File

@ -30,7 +30,6 @@ module.exports.solve = function(input) {
const toLocation = (seed) => {
let next = seed;
for(step of ['seed-to-soil', 'soil-to-fertilizer', 'fertilizer-to-water', 'water-to-light', 'light-to-temperature', 'temperature-to-humidity', 'humidity-to-location']) {
const curr = next
const foundConv = map[step].find(conv => conv.src.indexOf(next) !== -1)
if(foundConv) next = foundConv.dest[foundConv.src.indexOf(next)]
}