insert-if
Conditionally add elements to array using spread operators
; const arr = 'a' 'b' // eager evaluation (only use for literal values never for computed deep properties) ... // on-demand evaluation (safer for deep object properties as it prevents reference errors) ... 'd'; console;// > Array ['a', 'b', 'c', 'blue', 'd']