+ 1

Why does it pick heads or tails TWICE randomly? (Code link in description below here)

https://code.sololearn.com/WF2YoX6Jy5KZ/?ref=app

9th Mar 2022, 9:57 AM
Spencer Pawlik
Spencer Pawlik - avatar
3 Answers
+ 2
You are added to listeners 1st by inline 2nd by javascript
9th Mar 2022, 10:07 AM
Jayakrishna šŸ‡®šŸ‡³
+ 4
It seems to be related to the fact that you added the same event twice to the button: once in html, once in js tab.
9th Mar 2022, 10:07 AM
Lisa
Lisa - avatar
+ 3
Thank you! (And you too Brave Tea for trying to help)
9th Mar 2022, 10:08 AM
Spencer Pawlik
Spencer Pawlik - avatar