Skip to content

Latest commit

 

History

History

12-descending-order

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Descending order

Purpose

Your task is to make a function that can take any non-negative integer as a argument and return it with it's digits in descending order. Descending order means that you take the highest digit and place the next highest digit immediately after it.

Example

descendingOrder(123456789); //987654321
descendingOrder(1021); //2110

Decision