Question: 2. (5 marks) Using an array, create a standard deck of cards (52 cards). Create a function that randomly draw 2 cards and displays them.
2. (5 marks) Using an array, create a standard deck of cards (52 cards). Create a function that randomly draw 2 cards and displays them. The array code for the deck of cards is: varauita - ("Hearts", "Spades","cluba", "Diamondo"): var numbers - ("A","2","3","4","5","6","7","a","9","10","4","2","#": Your display should look similar to the display shown in Figure 2. Part 1 Question 2 Card 1 is: 7 of Clubs 1 Card 2 is: Q of Clubs
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
