JSFiddle - React, Tailwind, and code Playground

by Miklos Nagy

JavaScript

//we need to sort stuff in alphabetical order // umbrella, Girl, Girls, Boy, Boys, Books, Shelf, Citera, Cinnemon, et cetera

var list = "umbrella, Girl, Girls, Boy, Boys, Books, Shelf, Citera, Cinnemon, et cetera";

var newList = list.split(",");
console.log(newList);

var finalList = newList.sort( function(a, b){
return a.localeCompare(b);
} );

var Bar = [];
for(i=0;i<finalList.length;i++){
Bar.push("<tr><td>" + finalList[i] + "</td></tr>");
}
var table = "<table>" + Bar + "</table>";
document.body.innerHTML = table;