title: Javascript: Given an array, return a number of arrays with different ordered combinations of elements
body: <p>I need code that takes an array, counts the number of elements in it and returns a set of arrays, each displaying a different combination of elements. <strong>However,  the starting element should be the same for each array</strong>. Better to explain with a few examples:</p>
  
  <pre><code>var OriginalArray = ['a','b','c']
  </code></pre>
  
  <p>should return</p>
  
  <p><code>results: [['a','b','c'], ['a','c','b']]
  </code></p>
  
  <p>or for example: </p>
  
  <pre><code>var originalArray = ['a','b','c','d']
  </code></pre>
  
  <p>should return</p>
  
  <pre><code>[['a','b','c','d'], ['a','b','d', 'c'], ['acbd', 'acdb', 'adbc', 'adcb']]
  </code></pre>
  
  <p>Again note how the starting element, in this case 'a' should always be the starting element.</p>