getJobNames = (jobs, excludeIndex) => {
  const names = [];

  for (const [i, job] of jobs.entries()) {
    if (i === excludeIndex) continue;

    const name = getName(job);

    if (name) names.push(name);
  }

  return names;
}
Processes job objects extracting their names
Can conditionaly skip records by their index

@param {any[]} jobs
@param {number} excludeIndex
@returns {string[]} job names