Social distancing
Given a string and a symbol, insert the symbol between every letter as shown in the examples.
Sample Code:
function myFunc(str,inp) {
// Enter your logic here...
}
Examples:
Input: 'Hello World', '-'
Output: 'H-e-l-l-o-W-o-r-l-d'
Explanation: Every letter has been separated with '-'.
Input: 'Javascript',' '
Output: 'J a v a s c r i p t'
Explanation: Every letter has been separated with ' '.