Good and I tried to do that when I'm painting the data of a table and the condition is fulfilled instead of painting a data I put a label or a label-success so that when it is green or another color can access the , I have done it with html and php but now I want to do it differently. Mark me error in the if
Code
for(var i=0; i<resp.length; i++)
{
console.log(resp[i]);
html+= '<tr><td>'+resp[i].fecha_registro+
'</td><td>'+resp[i].dias_+
'</td><td>'+resp[i].contacto_nombre+
'</td><td>'+resp[i].modelo+
'</td><td class="center"><span class="center' if(resp[i].servicio==0){'label-success'}else{'label-warning'}'"></span>'
+resp[i].servicio+
'</td><td>'+resp[i].ventas+
'</td></tr>';
}