× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

Use modulo to loop through an array

Katie Siegel
Dec 20, 2014
<p>When you have an array and you want to continuously loop through that array, use something similar to the following:</p><p>nextIndex = (currentIndex + 1)%array.length</p>
comments powered by Disqus