Building a Concurrent Promise Queue with JavaScript

How to create a promise queue in JavaScript using both parallel and sequential methods.
Source: Codementor