HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by q_no | Hacker News Reader
Parent
Full thread
q_no
·
Thank you! Your suggestion makes sense indeed and works fine!
View on HN
Jtsummers
·
You can also use:
elevators.forEach(function(elevator, elevatorNumber) {...});
This will provide each elevator with its index in the elevators array.
Reply on news.ycombinator.com