title: How to split one string including it in the array javascript?
body: <p>Let's say we have the following strings:</p>
  <pre><code>const str1 = 'aabbcc';
  const str2 = 'aabbccaaddaaaaeeff';
  </code></pre>
  <p>I need to split them in order to obtain the following result:</p>
  <pre><code>mySplitFunction(str1, 'aa')//&lt;--- ['aa','bbcc']
  mySplitFunction(str1, 'bb')//&lt;--- ['aa','bb', 'cc']
  mySplitFunction(str2, 'aa')//&lt;--- ['aa','bbcc', 'aa','dd', 'aa','aa', 'eeff']
  mySplitFunction(str2, 'dd')//&lt;--- ['aabbccaa','dd', 'aaaaeeff']
  </code></pre>
  <p>How would you do it?</p>