Please do NOT use [].slice. It is slower and less efficient than using Array.prototype.slice. Same on indexOf below.