jquery increase by 1
<p>Afternoon,</p>

<p>I would like to increase the number in this code by 1 for each question displayed.</p>

<pre><code> new_question = "&lt;div id=\"" + res.qId + "\"&gt;" +
                            "&lt;h1&gt;Question 1&lt;/h1&gt;" +
                            "&lt;p&gt;&lt;i&gt;" + res.question + "&lt;/i&gt;&lt;/p&gt;" +
                            "&lt;div class=\"answer-grid\"&gt;" +
                            "&lt;div id=\"a1\" class=\"answer\"&gt;" +
                            "&lt;p&gt;" + res.answer1 + "&lt;/p&gt;" +
                            "&lt;p&gt;" + res.answer2 + "&lt;/p&gt;" +
                            "&lt;p&gt;" + res.answer3 + "&lt;/p&gt;" +
                            "&lt;/div&gt;" +
                            "&lt;/div&gt;";
</code></pre>

<p>With this it would show, question 1, question 2, and so on...</p>

<p>How would i go about doing this in jQuery please?</p>

<p><em><strong>Update</em></strong> Victor provided what i needed, thanks all for your help. Updated code below.</p>

<pre><code> var questionNumber = 1;
    $.each(result, function (index, res) {
        new_question = "&lt;div id=\"" + res.qId + "\"&gt;" +
                        "&lt;h1&gt;Question " + (questionNumber++) + "&lt;/h1&gt;" +
                        "&lt;p&gt;&lt;i&gt;" + res.question + "&lt;/i&gt;&lt;/p&gt;" +
                        "&lt;div class=\"answer-grid\"&gt;" +
                        "&lt;div id=\"a1\" class=\"answer\"&gt;" +
                        "&lt;p&gt;" + res.answer1 + "&lt;/p&gt;" +
                        "&lt;p&gt;" + res.answer2 + "&lt;/p&gt;" +
                        "&lt;p&gt;" + res.answer3 + "&lt;/p&gt;" +
                        "&lt;/div&gt;" +
                        "&lt;/div&gt;";

        $('#pinfos').append(new_question);
</code></pre>
