I´m concatenate two different arrays into one,
let myarray = [...myarray1, ...myarray2];
If myarray2 is undefined how can I make this concatenation in the best way?
if(myarray2){
let myarray = [...myarray1, ...myarray2];
}
This is too ugly INMHO. Could i not do something like:
let myarray = [...myarray1, ...?myarray2];