Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - let input = [
 - '5',
 - ];
 - let print = this.print || console.log;
 - let gets = this.gets || ((arr, index) => () => arr[index++])(input, 0);
 - let x= gets();
 - let deck= ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A'];
 - let suits=['clubs', 'diamonds', 'hearts', 'spades'];
 - let i=0;
 - for(deck[i]; deck[i]<=x; i++){
 - let arr=[];
 - for(let y=0; y<suits.length; y++){
 - arr +=deck[i] + " of " + suits[y] +", ";
 - }
 - print(arr.toString());
 - }
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment