I am looking to take a string and find all the spaces in it and separate that into different variables. I know I could use the .split() but that wouldn't make new variables. I would prefer to not use jQuery or other JavaScript library but if I have to, it wouldn't be the worst thing. Thanks!
Example, John M Peters would result in the variables fname: John, mname: M and lname:
Peters.