<form>
<div id="step-1" class="d-none"></div>
<div id="step-2" class="d-none"></div>
<div id="step-3" class="d-none"></div>
<div id="step-4" class="d-none"></div>
<div id="step-5" class="d-none"></div>
<button type="button" class="btn btn-success rounded-pill py-3 px-5 mx-auto text-dark fw-bold" id="prevBtn" disabled>Далее</button>
</form>
[current++ % words.length];
?
Код