I have checked many questions and answers regarding join array with comma separated string, But my problem is that, I am making the string readable for human i.e I have tag
var substr = new Array("One", "Two", "Three");
var commaList = '';
var i;
for (i = 0; i < substr.length; ++i) {
if (i == substr.length - 1)
commaList += " and " + substr[i];
else
commaList += ", " + substr[i];
}
console.debug(commaList.substr(2, commaList.length));