same as the video did but just change to the y value. what’s the thing that was wrong and how will I improve the thinking structure skill or imaging code?( very beginner question, and I realize the reason I couldn’t make things right is because my "structure of problem solving " is wrong.
What are you trying to do precisely? Can you link the video / original link that you are talking about?
The mouseY value is the y coordinate of the mouse in the canvas. So if your canvas is 800x800 pixels, then mouseY will be between 0 and (800 - 1) pixels. Therefore the above condition will rarely be true since 1 is really small.