My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

constructor function

Ayodele Tolulope's photo
Ayodele Tolulope
·Dec 8, 2017

hello guys,could you pls help with this?Write a constructor function for a Card object with properties of suit (diamonds, hearts, spades, or clubs) and face (ace, 2, 3 ...king). Add methods to set the values of suit and face. Can you include a shuffle method to set the suit and face properties to represent a random card from the deck? (Hint: Use the Math.random() method