Board Thread:General Coding Help/@comment-36889200-20181130123540/@comment-27958705-20181130124633

if(i !== 0) {s[i-1].style.display= "none"} s[i-1].style.display= "block"; so, s[i-1] will always 'display:block'.