Actually , i\'m designing an autoplay slider using vanilla javascript . so there are two functions , one will play the forward slider while other reverse . When i\'m on the last