Skip to main content
added 34 characters in body
Source Link

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 5656 96

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

JavaScript 69 (reversable)69 109 (79-10reversable)

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 5050 90

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

ES6 6363 103 (reversable) (73-10)

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

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

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

JavaScript 69 (reversable) (79-10)

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

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

ES6 63 (reversable) (73-10)

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

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(''))}
Source Link

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

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

JavaScript 69 (reversable) (79-10)

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

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

ES6 63 (reversable) (73-10)

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