Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

JavaScript issue with blackjack game on js

nil14

Coder
hey everyone, so I'm following that javascript tutorial on youtube where I learn to create a blackjack game and I came across this issue in which I can't render out 2 cards together on the display , I could render them out before when I set the variables to a specific number for example - " let firstCard = 4" ,"let secondCard = 7" , but now that I'm using the Math.random method something went wrong , I would really appreciate it if someone here could fix it for me or tell me what I did wrong .... thank you !!

link to my code
https://github.com/naex96/blackjackgame.git

link to the og tutorial it's around 3:40:00
To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 

New Threads

Buy us a coffee!

Back
Top Bottom