Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const cards = ['diamond', 'spade', 'heart', 'club'];
- let currentCard;
- while(currentCard != 'spade'){
- currentCard = cards[Math.floor(Math.random() * 4)];
- console.log(currentCard);
- }
Advertisement
Add Comment
Please, Sign In to add comment