join concat javascript code example
Example 1: javascript concat two arrays
//ES6
const array3 = [...array1, ...array2];
Example 2: javascript join address to string
var address = "foo";
var city;
var state = "bar";
var zip;
text = [address, city, state, zip].filter(Boolean).join(", ");
console.log(text)