Implement a queue data structure in JavaScript that contains the following operations:
new Queue(): Creates an instance of a Queue class that doesn't contain any items. The constructor does not accept any arguments.enqueue(item): Adds item to the back of the queue and returns the new number of items. Required time complexity: O(1).dequeue(): Removes and returns the item at the front of the queue, or returns undefined if the queue is empty. Required time complexity: O(1).isEmpty(): Determines if the queue is empty. Required time complexity: O(1).front(): Returns the item at the front of the queue without removing it, or returns undefined if the queue is empty. Required time complexity: O(1).back(): Returns the item at the back of the queue without removing it, or returns undefined if the queue is empty. Required time complexity: O(1).length(): Returns the number of items in the queue. Required time complexity: O(1).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