can you make an array of conditional statements code example
Example: conditional array element js
const cond = false;
const arr = [
...(cond ? ['a'] : []),
'b',
];
const cond = false;
const arr = [
...(cond ? ['a'] : []),
'b',
];