Skip to main content
2 of 2
added 34 characters in body

I don't see anything about sorting functions in the question, so... (I'm gonna remove the answer if it bends or breaks the rules, let me know)

JavaScript 56 96

function s(){alert(+prompt().split('').sort().join(''))}

JavaScript 69 109 (reversable)

function s(r){x=prompt().split('').sort();x=r?x.reverse():x;alert(+x.join(''))}

Can be golfed down a bit using EcmaScript 6 arrow functions:

ES6 50 90

s=()=>{alert(+prompt().split('').sort().join(''))}

ES6 63 103 (reversable) (73-10)

s=(r)=>{x=prompt().split('').sort();x=r?x.reverse():x;alert(+x.join(''))}