Unexpected token '*', stuck in initialising experiment

URL of experiment: https://pavlovia.org/run/Mycrobrine/mathematical-beauty
Haoxuan Zhang / Mathematical beauty · GitLab

Description of the problem: My experiment was running well at local level but when I put it online it stuck in “initialising experiment”. The web console says Uncaught SyntaxError: Unexpected token ‘*’

I have checked there is no naming issues and here I attach the only piece of code I wrote in this experiment. I wonder if it is the * in JS that caused the problem.

Very appreciated if anyone can solve this problem!

From my understanding, you can’t use the import random code for online experiments. You have to change the code type to JS and write JS code. The Javascript crib sheet produced by @wakecarter should provide you with some assistance on how to deal with this issue (see attached URL). https://discourse.psychopy.org/t/psychopy-python-to-javascript-crib-sheet/14601

Thank you so much for your help!
I will try to rewrite the code in JS