javascript string in order code example Example: sort a string in javascript var string='ACBacb'; var sortedString = string.split('').sort().join('');