class MyCoolArray extends Array {
	first() { return this[0] }
	last() { return this[this.length - 1] }
}
b = [1, 2, 3]
a = new MyCoolArray(...b)
console.log(a.first())
console.log(a[2])
console.log(b[-1])