mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-16 01:57:56 -04:00
Mentioning a range is equivalent to foreach (#1086)
* Mentioning a range is equivelant to foreach I’m new to Go and really struggled to find this. I added this sentence so it would be searchable for other people to find. At the moment, searching for a foreach doesn’t return range and IMHO it should. * Fixed a spelling error for equivalent
This commit is contained in:
parent
0c396911f1
commit
b3ffd1ad32
@ -20,6 +20,6 @@ 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.
|
||||
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.
|
||||
|
||||
`range` is fundamental to templating in Hugo. (See the [Introduction to Hugo Templates](/templates/introduction/) for more examples.)
|
||||
|
Loading…
x
Reference in New Issue
Block a user