Modulo Operator %%

When I'm working on a carousel that allows infinite scrolling and I need to support negative indices, I often find myself wanting a Modulo Operator.

const carousel: NodeList = document.getElementById("carousel");
const currentTarget = carousel[currentIndex %% carousel.length];

While I can somewhat mitigate this using Array.prototype.at when retrieving values, it isn't available for other iterables like NodeList, and I can't use it for assigning values to arrays.

As has already been discussed, CSS has rem() and mod(). Since JS only has %, I feel that %% would be a welcome addition as well.