Concatenate Employee Names
Easyreducestringarray
Given an array of employee name strings, use reduce to concatenate them into a single comma-separated string.
Examples
Input
[ "Alice", "Bob", "Carol" ]
Output
"Alice, Bob, Carol"
Constraints
- Array has at least 1 element
Hints
- Skip the separator for the first element by checking if acc is empty
⚠ Revealing the solution will disable submission credit for this session.
DataWeave 2.0
00:00
Loading...
Loading...