Javascript sorting string : <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>
