So I'm doing a project and I'm developing a fall down type game.
The problem seems to be on this line: createRect(20, 40, 25, 15, "red");
It looks like the rect is drawn but instantly disappears any idea on how to fix this? I'm not sure why this happens and I'm learning javascript so I don't have the experience to understand why this occurs