Trying to make a function that gives me the descending order version of a number backwards

so input: 123

output: 321

```
function descendingOrder(n)
{
var descending;
n = n.toString()
console.log(n)
if (n>0)
{
for(i=n.length ; n=0 ; n--)
{
descending+=n.charAt(i)
}
return parseInt(descending);
}
else
{
return console.log("not a positive integer");
}
}
descendingOrder(123);
```