WordCharWord

Published by Mubashir Hassan in

Create a function that will put the first argument, a character, between every word in the second argument, a string.

Examples

add("R", "javascript is fun") ➞ "javascriptRisRfun"

add("#", "hello world!") ➞ "hello#world!"

add("#", " ") ➞ "#"

Notes

Make sure there are no spaces between words when returning the function.

Watch a quick demo on how Edabit works.