elemen array bersyarat JS
const cond = false;
const arr = [
...(cond ? ['a'] : []),
'b',
];
// ['b']
Defiant Dragonfly
const cond = false;
const arr = [
...(cond ? ['a'] : []),
'b',
];
// ['b']