AnsweredAssumed Answered

Arcade function not labeling correctly

Question asked by roemhildtg on Sep 13, 2017
Latest reply on Sep 13, 2017 by roemhildtg

So, I'm trying to make a list of items in a label. Should look like this:

 

 

Instead, its looking like this:

 

 

The arcade snippet:

function bullet(item, isLast){
    return ' - ' + item + IIF(isLast, '', '\n');
}

function list(items){
    var body = '';
    for(var item in items){
        var index = IndexOf(items, item);
        var isLast = index == Count(items) - 1;
        body += IIF(IsEmpty(item), '', bullet(item, isLast));
    }
   
    return body;
}


'<BOL>UND>' + 'test' + '</BOL></UND>\n' + list( ['hey', 'there'])

 

What would be the issue I'm missing?

Outcomes