MCPcopy Create free account
hub / github.com/careercup/CtCI-6th-Edition-JavaScript / Card

Function Card

chapter07/7.01 - Deck of Cards/deckOfCards.js:1–5  ·  view source on GitHub ↗
(suit, number)

Source from the content-addressed store, hash-verified

1var Card = function(suit, number) {
2 this.suit = suit;
3 this.number = number;
4 this.value = `${this.number} ${this.suit}`;
5};
6
7var Deck = function() {
8 this.cards = [];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected