sort a string in javascript

JavaScript
var string='ACBacb';
var sortedString = string.split('').sort().join('');
Source

Also in JavaScript: