I am passing a javascript variable which contains the address and has multiple strings in one sentence. So while setting the variable, I want to break the sentence in 2 lines, i.e. streetNumber and streetName should be in first line and city and zipcode in second line. So I am trying to break the line using <br> tag like this:
let addr2 = inputDataState.addressDetails.addrObj.street.streetNumber + ' '
+ inputDataState.addressDetails.addrObj.street.streetPrefixCode
+ inputDataState.addressDetails.addrObj.street.streetName+ ' ' + <br />
+ inputDataState.addressDetails.addrObj.street.streetSuffixCode + ' '
+ inputDataState.addressDetails.addrObj.street.city + ' '
+ inputDataState.addressDetails.addrObj.street.zipCode ;
But instead of a line break, I am getting [object Object] . So how do I add the line break to divide the variable in 2 lines?
\n.[object Object], then one of those properties is not astringbut an object. Also,<br />is not wrapped in quotes""