Sign in
Log inSign up

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

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct