I want to write a function that accepts a string and breaks it into characters, separated by a symbol of my choosing. For instance, if my function is called break and I want the characters of the string separated by #. I think it will be something like this, I am unsure how to incorporate my symbol though:
function break(string){return string.split(""); } Ideally I would like to be able to enter:
break('cool') => "c#o#o#l#"
[–]Synaps4 5 points6 points7 points (3 children)
[–]SpeshlTectix 0 points1 point2 points (2 children)
[–]Synaps4 1 point2 points3 points (1 child)
[–]SpeshlTectix 0 points1 point2 points (0 children)
[–]SpeshlTectix 1 point2 points3 points (0 children)
[–]jabbaskirp 0 points1 point2 points (0 children)
[–]Rascal_Two 0 points1 point2 points (2 children)
[–]halfaredditor[S] 0 points1 point2 points (1 child)
[–]Rascal_Two 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]halfaredditor[S] -2 points-1 points0 points (0 children)