Source Code:
Start Animation
The queue length is:
Result:
W3Schools.com
- Try it yourself