I have a code segment that I adapted from another project. The code window is set to Auto -> JS as I plan to run my study online. In the builder view’s code editor, I get the error “/* Syntax Error: Fix Python code */”. My knowledge of python and JS is super limited though so I’m not sure what the error is when it tries to translate from python to JS. I was hoping someone could help me out.
Here is the code.
def clickCount(clicked, box): #Return the list indices of a box return [i+1 for i, x in enumerate(clicked) if x == box]
Thanks in advance!