code: function deltaReverse(arg, increment) {
    let newIdx = arg.idx + arg.direction * increment;
    if (newIdx >= arg.values.length) {
      arg.direction *= -1; // Reverse direction
      newIdx = arg.values.length - 2;
    }
  
    if (newIdx < 0) {
      arg.direction *= -1; // Reverse direction
      newIdx = 1;
    }
  
    if (newIdx >= 0 && newIdx < arg.values.length) {
      arg.idx = newIdx;
    }
  
    return true;
  }
docs: ============================================================================ Helper function used to handle next/previous when the loop function is 'reverse'