réagir l'élément de tableau conditionnel

const arr = [
  ...(cond ? ['a'] : []),
  'b',
];
Lucas Charvolin