Skip to content

Commit

Permalink
Rename variables used in map method
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz authored and fabpot committed Jan 14, 2022
1 parent e8068a9 commit b74cf2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/filters/map.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The arrow function also receives the key as a second argument:
"Alice": "Dupond",
} %}
{{ people|map((last, first) => "#{first} #{last}")|join(', ') }}
{{ people|map((value, key) => "#{value} #{key}")|join(', ') }}
{# outputs Bob Smith, Alice Dupond #}
Note that the arrow function has access to the current context.
Expand Down

0 comments on commit b74cf2a

Please sign in to comment.