Hi this code will work in all browser !!i used for new line in chrome and safari and ul li for IE
function genarateMultiLIneCode(){
var =values["a","b","c"];
const liStart = '- ';
const liEnd = '
';
const bullet = '• ';
var mergedString = ' ';
const unOrderListStart=''
const unOrderListEnd='
'
const fakeNewline = '
';
for (let i = 0; i < values.length; i++) {
mergedString += liStart + bullet + values[i] + liEnd + fakeNewline;
}
const tempElement = document.createElement("div");
tempElement.innerHTML = unOrderListStart + mergedString + unOrderListEnd;
return tempElement.innerText;
}
}