В
square() {return this.map(n => n * n);},
cube() {return this.map(n => Math.pow(n, 3));},
sum() {return this.reduce((p,n) => p + n, 0);},
average() {return this.reduce((p,n) => p + n, 0) / this.length;},
even() {return this.filter(n => !(n % 2));},
odd() {return this.filter(n => n % 2);}
});