how to assign class of html element to a javascript variable : I am passing a javascript variable "name" to the following function.

    function addCategory(name){
    	$("#myTable").append('<tr class=name><td>'+name+'</td><td><a onclick=""         type="button" class="btn btn-xs" ><i class="glyphicon glyphicon-erase"></i></a></td></tr>');
        
    	$('#postcat')[0].reset();
    	
        }

now suppose the name variable contains the value "general". I want the class name to be general and not name. How should I do it?