I'm new to javasript programming, so I have no idea why my code cannot work properly on qualtrics. This code aims to conduct a simple research. The participants need to click the "add" button to add red balls into the box, and if they want to draw a ball from the box, they should click the "draw button". If the participants pick a red ball, they win the game.
When I ran the code attached below, the console showed that my functions were not defined. Would you please give me some advices? Thanks a lot!
Javacript code:
Welcome to the game!
https://mays.ca1.qualtrics.com/ControlPanel/Graphic.php?IM=IM_3CoVCiGYSBcYWhL" width="320" height="240">