Implement a queue data structure in JavaScript that contains the following operations:
QueueCreates an instance of a Queue class that doesn't contain any items. The constructor not accept any arguments.
enqueueAdds an item to the back of the queue.
{*} item: The item to be added to the back of the queue.{number}: The new length of the queue.dequeueRemove an item from the front of the queue.
{*} item: The item at the front of the queue if it is not empty, undefined otherwise.isEmptyDetermines if the queue is empty.
{boolean}: true if the queue has no items, false otherwise.frontReturns the item at the front of the queue without removing it from the queue.
{*}: The item at the front of the queue if it is not empty, undefined otherwise.backReturns the item at the back of the queue without removing it from the queue.
{*}: The item at the back of the queue if it is not empty, undefined otherwise.lengthReturns the number of items in the queue.
{number}: The number of items in the queue.const queue = new Queue();queue.isEmpty(); // truequeue.enqueue(1);queue.enqueue(2);queue.length(); // 2queue.enqueue(3);queue.front(); // 1queue.back(); // 3queue.dequeue(); // 1queue.isEmpty(); // false