title: Javascript sorting string
body: <p>I have array <code>['A', 'B', 'A', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'A']</code>
  and i want to sort into <code>['A', 'A', 'B', 'B', 'A', 'A', 'B', 'B', 'A', 'A', 'B', 'A', 'A']</code>.
  how to solve it using javascript ?</p>