ReferenceError: popRandomElement is not defined

URL of experiment:

Description of the problem: Hey guys, so i’m having a problem where a function “popRandomElement” which i have defined in my psychopy experiment in a Begin Experiment Tab in JS, comes up with an error message when i try to access it later on in a trial and i can’t seem to figure out what the problem is… if anyone has any idea what might be the issue i’d appreciate any pointers!!

This is how all my functions are defined in the begin experiment tab:

And this is the line (line 1189) in which i’m having trouble with the error message later on in the code…

Greatful for any tips! Thanks!