advent of code 2023 day 5: cleanup log var
This commit is contained in:
parent
3de76649c8
commit
fa5081bb59
|
@ -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)]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue