JS - Making a Bulleted List from an Array

Sep 05, 2019

var player = GetPlayer();

var itm01 = player.GetVar("item1");
var itm02 = player.GetVar("item2");
var itm03 = player.GetVar("item3");
var itm04 = player.GetVar("item4");
var itm05 = player.GetVar("item5");

var mrn_itms = [itm01, itm02, itm03, itm04, itm05];
mrn_itms = mrn_itms.filter(Boolean);

var MyList = "<ul><li>"+ mrn_itms.join("</li><li>") + "</li></ul>";

player.SetVar("SL_mrn_list", MyList);

 

 

The var for MyList isn't creating a bulleted list. This seemed to work a couple of years ago. Any idea how I can convert my array into a bulleted list?

Be the first to reply

This discussion is closed. You can start a new discussion or contact Articulate Support.