Array.prototype.push.apply(this.nodesToVisit, this.nodesToRevisit);

with this operation you can cache this.nodesToVisit to local variable