JS: array.prototype ( prev and next )