News for hackers. Stuff that matters.
Re:Elevator Saga – An elevator programming game by emiphil on Saturday June 12, 2021 @09:47PM (#27489077)
for (elevator ... Like that is making a new global variable called elevator which is getting overwritten on the next loop. You need to for(const elevator... (or let).

The other thread is the same answer but for a slightly different case

There are no comments on this comment yet.