Adding different classes to each list item name as class

I want to add a class of each li items like Adding different classes to each list item

I used code from here Adding different classes to each list item

$(function () {

  $(".sd-list li").each(function(index) {
        $(this).attr("class", "color" + index);
  });

});

It is add the class like color0, color1
But I want add a class of given attribute name like

  • Brand
  • It is display the <li class”color-brand”>Brand

    Please let me know how can i do this becase am not want to add 0, 1, 2 I want the class as a name