WordCharWord

Published by Matt in

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

Examples

add("R", "ruby is fun") ➞ "rubyRisRfun"

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.