Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- var way = "";
- function RecFind2(list)
- {
- for (var i = 0; i < list.length; i++)
- {
- var temp = list[i];
- var nextList = list.slice();
- way += temp;
- nextList.splice(i,1);
- if (nextList.length > 0) {RecFind2(nextList);}
- else {document.writeln(way);}
- way = way.slice(0,-1);
- }
- }
- var SomeName = [0,1,2,3];
- RecFind2(SomeName);
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement