I need to show a combination of number, how to achieve this in JavaScript
example
input:
123
Output(n*(n-1) combinations)
123
132
213
231
321
312
the given number is anything, how to achieve in short way?
I need to show a combination of number, how to achieve this in JavaScript
example
input:
123
Output(n*(n-1) combinations)
123
132
213
231
321
312
the given number is anything, how to achieve in short way?