Skip to content

Files

Latest commit

 

History

History

Array-Iterate

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Iterating over a slice/array

There are a couple of different ways to iterate. The primary approach is to use range, which handles the iteration for you. However, you can also use a traditional for loop if you need to do something out of the ordinary, like iterating in reverse or skipping every other element.

Watch this lesson at Egghead.io.