How to concatenate in JS? [closed]

-3

The variable c has a value of 0. I want to concatenate this value in + + but it is giving error. How to concatenate% in% correct%?

c = 0; 
$('li').each(function() { 
   quantidadeDeEmails = $('li').length; 
   destinatarios = []; 
   $('li').eq(+c+);
   console.log(destinatarios); 
});
    
asked by anonymous 06.01.2018 / 00:35

1 answer

1

You do not need to concatenate anything, just pass the c variable.

c = 0;
$('li').each(function() {
     quantidadeDeEmails = $('li').length;
     destinatarios = [];
     $('li').eq(c);
     console.log(destinatarios);
});
    
06.01.2018 / 00:44