title: How do I split a string at a space after a certain number of characters in javascript?
body: <p>So I have a nice long string that I need to split in Javascript at a space following a certain amount of characters. For instance, if I have </p>
  
  <p>"You is a dog and I am a cat."</p>
  
  <p>and I want it to split after 10 characters but at the next space... so rather than splitting dog up I want the next space to be the split point.</p>
  
  <p>I hope I wrote that clearly, its a bit awkward to explain.</p>
  
  <p>EDIT: I need to store all of this into an array. So splitting the string up as I described, but storing it into an array which I can iterate through. Sorry for the confusion- like I said, a bit odd to describe.</p>