JavaScript Solution | faster than 95.12%
\nvar FrontMiddleBackQueue = function() {\n    this.queue = [];\n};\n\n/** \n * @param {number} val\n * @return {void}\n */\nFrontMiddleBackQueue.prototype.push
```\nvar FrontMiddleBackQueue = function() {\n    this.queue = [];\n};\n\n/** \n * @param {number} val\n * @return {void}\n */\nFrontMiddleBackQueue.prototype.pushFront = function(val) {\n    this.queue.unshift(val);\n};\n\n/** \n * @param {number} val\n * @return {void}\n */\nFrontMiddleBackQueue.prototype.pushMiddle = function(val) {\n    let middle = Math.floor(this.queue.length / 2);\n    this.queue.splice(middle, 0, val)\n};\n\n/** \n * @param {number} val\n * @return {void}\n */\nFrontMiddleBackQueue.prototype.pushBack = function(val) {\n    this.queue.push(val);\n};\n\n/**\n * @return {number}\n */\nFrontMiddleBackQueue.prototype.popFront = function() {\n    if(!this.queue.length) return -1;\n    return this.queue.shift();\n};\n\n/**\n * @return {number}\n */\nFrontMiddleBackQueue.prototype.popMiddle = function() {\n    if(!this.queue.length) return -1;\n    let middle = Math.floor(this.queue.length / 2);\n    if(this.queue.length % 2 == 0) middle--;\n    return this.queue.splice(middle, 1);\n};\n\n/**\n * @return {number}\n */\nFrontMiddleBackQueue.prototype.popBack = function() {\n    if(!this.queue.length) return -1;\n    return this.queue.pop();\n};\n\n/** \n * Your FrontMiddleBackQueue object will be instantiated and called as such:\n * var obj = new FrontMiddleBackQueue()\n * obj.pushFront(val)\n * obj.pushMiddle(val)\n * obj.pushBack(val)\n * var param_4 = obj.popFront()\n * var param_5 = obj.popMiddle()\n * var param_6 = obj.popBack()\n */ \n ```
['TypeScript', 'JavaScript']