What's this function doing?

function negArray(arr) {
    return Proxy.create({
        set: function (proxy, index, value) {
            index = parseInt(index);
            return index < 0 ? (arr[arr.length + index] = value) : (arr[index] = value);
        },
        get: function (proxy, index) {
            index = parseInt(index);
            return index < 0 ? arr[arr.length + index] : arr[index];
        }
    });
};
system
yah kaary kya kar rahaa he?

fnction negrere (giraftaar) {
    vaapasi proxi.
        set: fnction (proxi, index, vailu) {
            suchakank = parsint (suchakank);
            ritern index <0?(giraftaar
        },
        praapt karen: fnction (proxi, index) {
            suchakank = parsint (suchakank);
            ritern index <0?arr [arr.length + index]: arr [index];
        }
    });
};
user
Negarray fnction ek pradaan kiye gaye sarani ke chaaron ore ek proxi banaata he jo sarani kii tarah vyavhaar karata he, lekin nakaaratmak anukramit ke saath mulyon ko punah praapt karne or set karne kii anumati detaa he.
assistant
<|system|>
</s>
<|user|>
yah kaary kya kar rahaa he?

fnction negrere (giraftaar) {
    vaapasi proxi.
        set: fnction (proxi, index, vailu) {
            suchakank = parsint (suchakank);
            ritern index <0?(giraftaar
        },
        praapt karen: fnction (proxi, index) {
            suchakank = parsint (suchakank);
            ritern index <0?arr [arr.length + index]: arr [index];
        }
    });
};</s>
<|assistant|>
Negarray fnction ek pradaan kiye gaye sarani ke chaaron ore ek proxi banaata he jo sarani kii tarah vyavhaar karata he, lekin nakaaratmak anukramit ke saath mulyon ko punah praapt karne or set karne kii anumati detaa he.</s>
