Description of the problem: My experiment currently runs perfectly offline, but when online I keep getting errors that my variables aren’t defined. I defined individual variables at the beginning of the JS code just to make sure that was the actual problem, but I know that defining each variable individually is not a solution to the underlying problem. I’m new at JS, so any advice would be greatly appreciated.
If the first time a variable is used is within a clause (e.g. if ) then you need to define it first outside a clause. I usually do this is Begin Experiment. Use Python auto translate not JS directly. For example, if x is not defined put x = 0.