diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-03-19 22:28:49 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-03-19 22:39:19 +0100 |
| commit | ab43bd802eafe33977a91893907e67553e099569 (patch) | |
| tree | af4dead92b143348f52e2e8f869df3f7dfd7322a /docs/src/tutorial | |
| parent | d6aaae0cea1e79eecd85dc94ab85b9ad8eff48e8 (diff) | |
Renaming and refactoring
Diffstat (limited to 'docs/src/tutorial')
| -rw-r--r-- | docs/src/tutorial/4-template.md | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/src/tutorial/4-template.md b/docs/src/tutorial/4-template.md index d49ee6a1..3208f012 100644 --- a/docs/src/tutorial/4-template.md +++ b/docs/src/tutorial/4-template.md @@ -206,11 +206,12 @@ from the dictionary, we use the [field access syntax]($scripting/#fields). We still have to provide an argument to the grid for each author: Here is where the array's [`map` method]($type/array.map) comes in handy. It takes a function -as an argument that gets called with each element of the array. We pass it a +as an argument that gets called with each item of the array. We pass it a function that formats the details for each author and returns a new array containing content values. We've now got one array of values that we'd like to -use as multiple arguments for the grid. We can do that by using the -[`spread` operator]($type/arguments). It takes an array and applies each of its elements as a separate argument to the function. +use as multiple arguments for the grid. We can do that by using the [`spread` +operator]($type/arguments). It takes an array and applies each of its items as a +separate argument to the function. The resulting template function looks like this: |
