[doc] "map" filter: fix args order (value, key)

This commit is contained in:
Guilliam Xavier
2019-06-24 12:54:09 +02:00
committed by GitHub
parent 40f703ab40
commit d01e7e0fed
+1 -1
View File
@@ -26,7 +26,7 @@ The arrow function also receives the key as a second argument:
"Alice": "Dupond",
} %}
{{ people|map((first, last) => "#{first} #{last}")|join(', ') }}
{{ people|map((last, first) => "#{first} #{last}")|join(', ') }}
{# outputs Bob Smith, Alice Dupond #}
Note that the arrow function has access to the current context.