const spaceCount = 50 - (item.Name.length + item.Weight.toString().length +4 );
const combined = item.Name + item.Weight.toString().padStart(spaceCount , " ") + " gms";
optionElement.value = combined ;
suggestionsList.appendChild(optionElement);
I am doing this to allign on the weight in one end but as in the screenshot some of them are at different lengths . Why is this? Not sure if this is the place