Spaces Between Each Character

Published by Nomore in

Create a function that takes a string and returns a string with spaces in between all of the characters.

Examples

SpaceMeOut("space") ➞ "s p a c e"

SpaceMeOut("far out") ➞ "f a r   o u t"

SpaceMeOut("elongated musk") ➞ "e l o n g a t e d   m u s k"

Notes

Treat a space as its own character (i.e. leave three spaces between words).

Watch a quick demo on how Edabit works.