Hey guys! I need some help here with jquery. I am trying to pass a variable in eq. :       <html>
    <head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    </head>
    <body>
    <form method="post" action="#" enctype="multipart/form-data">
    <div id=parent_div0>
    <div><button class=cd type="button" id="add_step" > Add step0!</button></div>
    <div><button  class=cd type="button" id="add_faizlami" > Add stepss0!</button></div>
    <input type='submit' name='submit'>
    </div>
    <div id=parent_div1>
    <div><button type="button" id="add_step1" > Add step1!</button></div>
    <div><button  type="button" id="add_faizlami" > Add stepss1!</button></div>
    </div>
    <div id=parent_div2>
    
    <div><button  type="button" id="add_step2" > Add step2!</button></div>
    <div><button   type="button" id="add_faizlami2" > Add stepss2!</button></div>
    </div>
    
    <br/>
    </form>
    </div>
    </body>
    </html>
    <script>  
    <script>
    var l='hello';
    var counter=0;
    var variable='parent_div' +counter;
    
    $('#' + variable div:eq(' + counter + ')).append(l);
    </script>

I have parent_div1, parent_div2 etc.(it will be dynamic and so I don't know the last one) in html and in each parent _div, I have several divs and i would like to append 'Hello' to the last div of a parent_div based on the value of the variable counter, but my appending line isn't working. Is there any problem with the syntax? I would really appreciate any help. I have been trying long to make this work.