How to check the sequence of output values?

Depending on the data entered in the result of the calculation displays the sequence of values a1, a2, a3, a4, a5 (ten times). But they can be displayed in the correct sequence 1,2,3 and so on, and in the opposite (a1, a5, a4, a3, a2)

You need to take the first value (a1) and see what follows after it, and if for example, this a5 print one picture, and if a2 then the other

I take only a1, and how to compare with the following? Please tell me.
var go = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "1");
var goimage = Array("img1", "img2", "img3", "img4", "img5", "img6", "img7", "img8", "img9", "img10");

document.getElementById('result').innerHTML = "<img src=\"images/result/" + goimage[a1] + "-result.png\" alt=\"" + "\" />";

<div id="result">&nbsp;</div>
April 3rd 20 at 18:24
1 answer
April 3rd 20 at 18:26
I think you need to read about "Template line" in es6
one of the options
https://developer.mozilla.org/ru/docs/Web/JavaScri...

Find more questions by tags JavaScript