range.md (685B)
1 --- 2 title: range 3 linktitle: 4 description: Iterates over a map, array, or slice. 5 date: 2017-02-01 6 publishdate: 2017-02-01 7 lastmod: 2017-02-01 8 categories: [functions] 9 menu: 10 docs: 11 parent: "functions" 12 keywords: [iteration] 13 signature: ["range COLLECTION"] 14 workson: [] 15 hugoversion: 16 relatedfuncs: [] 17 deprecated: false 18 draft: false 19 aliases: [] 20 --- 21 22 Just like in the Go programming language, Go and Hugo templates make heavy use of `range` to iterate over a map, array or slice. Other templating languages use a foreach for the equivalent functionality. 23 24 `range` is fundamental to templating in Hugo. (See the [Introduction to Hugo Templates](/templates/introduction/) for more examples.)