combine values of address line 1 and address line 2 javascript

JavaScript
//String concatenation in table

//Case Scenario - Address line 1 and 2 are different strings

//Desired Output - One single Address

//Solution:-

 {merchant.merchant.companyAddress1 +
                  ', ' +
                  merchant.merchant.companyAddress2 +
                  ', ' +
                  merchant.merchant.companyAddress3 +
                  ', ' +
                  merchant.merchant.companyCity +
                  ', ' +
                  merchant.merchant.companyState +
                  ', ' +
                  merchant.merchant.companyCountry +
                  ' ' +
                  '-' +
                  ' ' +
                  merchant.merchant.companyPincode}
Source

Also in JavaScript: