Refer to the following code snippet and identify the use of theshift()method in the code provided.
?
pokerCard.prototype.replaceFromDeck = function(pokerDeck) {
this.suit = pokerDeck.cards[0].suit;
this.rank = pokerDeck.cards[0].rank;
this.rankValue = pokerDeck.cards[0].rankValue;
pokerDeck.cards.shift();
}

A. To remove the suit, rank, and rankValue from the pokerDeck object
B. To add the suit, rank, and rankValue to the pokerDeck object
C. To add the first card to the cards array in the pokerDeck object
D. To remove the first card from the cards array in the pokerDeck object.

Answer: D

Computer Science & Information Technology

You might also like to view...

The address bar at the top of the Computer folder window depicts a file location.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

When a filter is in effect, you can redisplay all records by clicking the ____ button on the Home tab.

A. Remove Filter B. Filter C. All D. Toggle Filter

Computer Science & Information Technology