using arrays as conditional code example Example: conditional array element js const cond = false; const arr = [ ...(cond ? ['a'] : []), 'b', ];