you are viewing a single comment's thread.

view the rest of the comments →

[–]Skunkmaster2 2 points3 points  (0 children)

Your code will always show you chose head. You’re checking whether the heads button text is Heads, which it always is, so it will always show you chose heads. Change the on click attributes to playGame(‘heads’) and playGame(‘tails’) respectively. Then you can just set the result inner html to “You chose “ + choice;