I learned to program in grade 8 (Basic, C, ..), and just got used to the idea that simple things (like detecting a click) were tough to do.
I mean how is it possible to track + display the position of the mouse in three lines
// choose the canvas
const canvas = document.querySelector('#draw');
// listen for mouse movement
// display the mouse x and y coordinates
Feel free to message me if you have any questions.
Subscribe to Ali Nawab
Get the latest posts delivered right to your inbox