title: how can I make a back button?
body: <p>I have a classlist:</p>
  <pre><code>const answers = document.querySelectorAll('.answer')
  </code></pre>
  <p>and the next button using forEach:</p>
  <pre><code>nextButton.addEventListener('click', function(e) {
     nextAnswer();
  }
  const nextAnswer = () =&gt; {
      answers.forEach( function(el) {
          if (!el.classList.contains('hidden')) {
            el.classList.add('hidden')
            console.log(el)
          }
      })
      answers[currAnswer].classList.remove('hidden')
      currAnswer++
      if(currAnswer == 7) {
         nextButton.innerHTML = &quot;Send&quot;
         nextButton.className = &quot;submit_button&quot;
  
      }
  }
  </code></pre>
  <p>here is the html:</p>
  <pre><code>&lt;div class=&quot;answer question_one hidden&quot;&gt;
      &lt;div class=&quot;pictures&quot;&gt;
          &lt;div data-id=&quot;0&quot; id=&quot;picture&quot; class=&quot;picture&quot;&gt;
              &lt;img src=&quot;C:\\Users\\User\\Desktop\\kviz\\Photo\\Question1\\i.jpg&quot; width=250px height=250px&gt;
          &lt;/div&gt;
          &lt;div data-id=&quot;1&quot; id=&quot;picture&quot; class=&quot;picture&quot;&gt;
              &lt;img src=&quot;C:\\Users\\User\\Desktop\\kviz\\Photo\\Question1\\i1.jpg&quot; width=250px height=250px&gt;
          &lt;/div&gt;
          &lt;div data-id=&quot;2&quot; id=&quot;picture&quot; class=&quot;picture&quot;&gt;
              &lt;img src=&quot;C:\\Users\\User\\Desktop\\kviz\\Photo\\Question1\\i2.jpg&quot; width=250px height=250px&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;answer question_three hidden&quot;&gt;
      &lt;input type=&quot;text&quot; class=&quot;address_input&quot; placeholder=&quot;Введите адрес&quot;&gt;
      &lt;div class=&quot;inline&quot;&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;answer question_four hidden&quot;&gt;
      &lt;div class=&quot;f_main&quot;&gt;
          &lt;input type=&quot;checkbox&quot; class=&quot;custom-checkbox&quot; id=&quot;0&quot; name=&quot;happy&quot; value=&quot;yes&quot;&gt;
          &lt;label for=&quot;0&quot;&gt;5&lt;/label&gt;
          &lt;input type=&quot;checkbox&quot; class=&quot;custom-checkbox&quot; id=&quot;1&quot; name=&quot;happy&quot; value=&quot;yes&quot;&gt;
          &lt;label for=&quot;1&quot;&gt;30&lt;/label&gt;
          &lt;input type=&quot;checkbox&quot; class=&quot;custom-checkbox&quot; id=&quot;2&quot; name=&quot;happy&quot; value=&quot;yes&quot;&gt;
          &lt;label for=&quot;2&quot;&gt;60&lt;/label&gt;
          &lt;input type=&quot;checkbox&quot; class=&quot;custom-checkbox&quot; id=&quot;3&quot; name=&quot;happy&quot; value=&quot;yes&quot;&gt;
          &lt;label for=&quot;3&quot;&gt;80&lt;/label&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>how can I make a back button ?
  I tried to implement it but couldn't
  &quot;He asks for clarification but I do not know what to add&quot;</p>