I got some idea from a C# related thread, but I need it in Javascript. I am try all sorts of things, it doesn't seem to work.
name.replace(/[A-Z]/g, / $&/);
What I am trying to do is make:
FirstName
with spaces:
First Name
But what I get is:
/ F/irst/ N/ame
Any ideas would be much appreciated.