const arr = [1,2,3]
function proxy(arr){
return new Proxy(arr,{
get(target,i){
// console.log(target,i)
i = (Number(i)+arr.length)%arr.length
return target[i]
}
})
}
let arr1 = proxy(arr)
console.log(arr1[-2])
12-19
531
05-16
1256
02-17
9838