0
[SOLVED] Array descending
Why is the array.sort() descending not having an output in this code after the button click? https://code.sololearn.com/W0v9HbJ8okP5/?ref=app
5 Respostas
+ 1
+ 1
Worked to change the
reverse().sort()
to
sort().reverse()
Thanks for the help👍
https://code.sololearn.com/W0v9HbJ8okP5/?ref=app
0
Are you want to sort array by alphabet and reverse or do you want only reverse array? In first case use .sort() (without parameters) and then .reverse() method. In second case use only .reverse()
0
alphabetic and reverse.
What i did here in this code but then the opposite way
https://code.sololearn.com/WY1B3dmDwRiS/?ref=app
0
I see, but its still ascending instead of descending the output.