mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-10-06 17:35:28 -04:00
23 lines
557 B
Markdown
23 lines
557 B
Markdown
---
|
|
title: range
|
|
linktitle:
|
|
description: Iterates over a map, array, or slice.
|
|
godocref:
|
|
date: 2017-02-01
|
|
publishdate: 2017-02-01
|
|
lastmod: 2017-02-01
|
|
categories: [functions]
|
|
tags: [iteration,fundamentals]
|
|
signature:
|
|
workson: []
|
|
hugoversion:
|
|
relatedfuncs: []
|
|
deprecated: false
|
|
draft: false
|
|
aliases: []
|
|
---
|
|
|
|
Just like in the Go programming language, Go and Hugo templates make heavy use of `range` to iterate over a map, array or slice.
|
|
|
|
`range` is fundamental to templating in Hugo. (See the [Go Template Primer](/templates/go-templates/) for more examples.
|