title: How to reorder words in sentences
body: <p>I have sentences like these: </p>
  
  <pre><code>Have I Banana
  
  Have I Apple
  
  Have I Car
  </code></pre>
  
  <p>I need to reorder the words into 2, 1, 3 (the 2nd word go before the 1st) so it becomes normal sentences Example:</p>
  
  <pre><code>I have Banana
  
  I have Apple
  
  I have Car
  </code></pre>
  
  <p>My code is like this so far, since I'm new to Javascript - I don't know much:</p>
  
  <pre><code>var text = document.getElementById('mytext');
  var result = document.getElementById('myresult');
  var lines = text.value.split('\n');
  result.value = '';
  for(i=0; i&lt;lines.length;i++) {
    var line = lines[i];
    var word = line.split(' ');
  
  }
  result += word[2]+word[1]+word[3];
  </code></pre>
  
  <p>That code might be completely wrong, I don't know how to split <code>\n</code> and <code>' '</code> at the same time</p>