I want to iterate my code in js through the list of options:
option=["1","2","3"]
3 forms to appear: first with the value 1 then when I submit it then next form should appear with value:2
You can use innerHTML property on a div which contains the form you want to update. Whenever the submit button is pressed for a question, call a function to increase the counter. Depending on the counter take what you want to place in the div. Eg.
function updateForm() {
let element = document.querySelector('.question');
let htmlToAdd = '<form> ... </form>'
element.innerHTML = htmlToAdd;
}
A better approach would be to use an array of objects with each object containing information about what is to be added to the HTML.