I don't mean to be pedantic; well actually I do. The spacify solution is incorrect as the sample suggests that a blank space is not replaced with 2 blank spaces.
A correct solution would be:
function spacify(input) { return input.replace(/([^ ])/g, '$1 '); }