function Q(){ this.data = []; this.enq = enq; this.deq = deq; this.isEmpty = isEmpty; } function enq(el){ typeof(el) == "object" && el.length >= 0 ? this.data = this.data.concat(el) : this.data.push(el); } function deq(){ return this.data.shift(); } function isEmpty(){ return this.data.length == 0 ? true : false; }