how to add separator only when needed #1180
Answered
by
RomRider
Mariusthvdb
asked this question in
Q&A
Answered by
RomRider
May 27, 2026
Replies: 1 comment 2 replies
|
Use Array.push to add each element of your string to an array and then use Array.join(' | ') at the end. It will do it for you. |
2 replies
Answer selected by
Mariusthvdb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



Use Array.push to add each element of your string to an array and then use Array.join(' | ') at the end. It will do it for you.