0

Does anyone knows how can I implement this functionality in javascript?

'hello world'.spacify() -> 'h e l l o  w o r l d'
3
  • Are you sure you need to do that? What about CSS letter-spacing? In HTML you´ll have there only one space between words (2 or more white space characters are ignored). Commented Jul 3, 2014 at 5:59
  • Yes I need to do that. Commented Jul 3, 2014 at 6:03
  • Also answered here: stackoverflow.com/questions/7437385/… stackoverflow.com/questions/7371949/… Commented Jul 3, 2014 at 6:15

1 Answer 1

3

'hello world'.split("").join(" ") should do the job

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.