Y
Hacker News
new
|
ask
|
show
|
jobs
by
q_no
4162 days ago
Thank you! Your suggestion makes sense indeed and works fine!
1 comments
Jtsummers
4162 days ago
You can also use:
elevators.forEach(function(elevator, elevatorNumber) {...});
This will provide each elevator with its index in the elevators array.
link