mouse.isPressedIn()

How to translate this python code:

if mouse_2.isPressedIn(go):
   continueRoutine = False 

into javascript?

I upload an example program to pavlovia https://gitlab.pavlovia.org/succiWang/test . really need your help,thanks!

The syntax of a loop is just slightly different in Js than in Python:

if (mouse_2.isPressedIn(go)) {  // Add parentheses and a curly brace {
      continueRoutine = false;  // Add a semicolon and make "false" lowercase
    }  // Add a curly brace }

Thanks for your sincere help . I tried this syntax before , however, the experiment couldn’t run successfully , it alerted me that " mouse .is PressedIn() " is an invalid syntax online. :anguished: