You are extending Array.prototype. It is not suitable.