Reset array value at end