Thank you for your answer, I've been working in generating a list from an object with checkboxes, but I notice that the bigger the list the more difficult for the user to find an item is. So, how can I make this list looks more like the image?? Add an index letter on the side.
const myObjects = {
Ana: 99,
Jhon: 99,
Carla: 99,
George: 99,
Luis: 99,
Mario: 99,
Brandy: 99,
Gin: 99,
Ann: 99,
Arnold: 99,
Coffee: 99,
Karl: 99,
Kevin: 99,
Kurt: 99,
}
//Create an arry from Object Keys and display it
let NameDataBase = []
NameDataBase = Object.keys(myObjects);
//Sort ascending
NameDataBase.sort();
//Create CheckBox and use NameDataBase for labels
var myDiv = document.getElementById("cboxes");
for (var i = 0; i < NameDataBase.length; i++) {
var checkBox = document.createElement("input");
var label = document.createElement("id");
var br = document.createElement('br');
checkBox.type = "checkbox";
checkBox.value = NameDataBase[i];
checkBox.id = NameDataBase[i];
myDiv.appendChild(checkBox);
myDiv.appendChild(label);
myDiv.appendChild(br);
label.appendChild(document.createTextNode(NameDataBase[i]));
}
<div id="cboxes"></div>
