I have an array of strings, I want to display the content with some html tags in the alert level. I tried this:
array = ["toto", "titi"]
alert("*" + array.join('n'))but the problem here, I got only the first line with *. how can I resolvr this probleme to show all the lements with * in the begining ?
Advertisement
Answer
var arrStr = ["toto","titi"];
alert([''].concat(arrStr).join('n*').trim());