Similar to Javascript's in-built Array.at function, but allows offsets to wrap.
Array
Index
const test = [1,2,3,4,5,6];atWrap(0); // 1atWrap(-1); // 6atWrap(-6); // 1 Copy
const test = [1,2,3,4,5,6];atWrap(0); // 1atWrap(-1); // 6atWrap(-6); // 1
These values would return undefined using Array.at since its beyond the length of the array
atWrap(6); // 1atWrap(-7); // 6 Copy
atWrap(6); // 1atWrap(-7); // 6
Similar to Javascript's in-built Array.at function, but allows offsets to wrap.