Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Andre Torres pset-functions #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chicomangusta
Copy link

didn't finish

Comment on lines +34 to 45
// const playerCardScore = 3
// const dealerCardScore = 4

function blackJack(playerCardScore, dealerCardScore) {
if (playerCardScore <= 21 && dealerCardScore <= 21) return Math.max(playerCardScore, dealerCardScore);
if playerCardScorea <= 21) return playerCardScore;
if (dealerCardScore <= 21) return dealerCardScore;
return = 0
}
playerCardScore(19)
dealerCardScore(21)
// Add your code above this line
Copy link

@Tech-J Tech-J Oct 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chicomangusta Good solution here, you got a few tweaks to make in order to make it work.

  • Instead of calling playerCardScore(19) dealerCardScore(21) you can call blackJack (19, 22)
  • On-Line 39 you're missing a parenthesis and your variable name says playerCardScorea but it should say playerCardScore.
  • On Line 41 when you use the return keyword instead of returning 0 like this return = 0 you would do this return 0

take a look at this solution here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants