Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function unusedDigits(){
- const args = [].slice.call(arguments).join('');
- const num = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
- const res = [];
- for (let numIndex = 0; numIndex < num.length; numIndex++) {
- if(args.indexOf(num[numIndex]) > -1) {
- continue;
- }
- res.push(num[numIndex]);
- }
- return res.join('');
- }
Add Comment
Please, Sign In to add comment