[javascript] Create a <ul> and fill it based on a passed array