title: How to sort strings in a pre decided order in Javascript?
body: <p>I need a sorting function to sort an array with an order of b->c->a, without defining new array.</p>
  
  <p>input.sort(func) => output</p>
  
  <p>Input: ['b', 'b', 'c', 'c', 'a', 'c', 'b', 'a']</p>
  
  <p>Output: ['b', 'b', 'b', 'c', 'c', 'c', 'a', 'a']</p>