79818760

Date: 2025-11-13 10:57:25
Score: 0.5
Natty:
Report link

If you are restricted to ExtendScript (eg as Adobe InDesign scripter), then you could use this function:

function removeItemOnce(arr, value) {
    for ( i in arr ) {
        if ( arr[i] == value ) {
            arr = arr.splice(i, 1);
            break;
    }
    }
    return arr;
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Rudi