Thanks for your replies, apparently whatever I had added after the 'var ctx = can.getContext("2d");' is not present here, because I forgot to save it.
So I forced myself to rember what I had written before and it didn't work that too,
Figure it out: it was all written inside the 'script.js' file.
Just a quick copy paste between <script> ... </script> in the html file and it works flawlessly.
https://code.sololearn.com/Wx1fo2350WvN/#
I don't recall it was ever written anywhere that it has to be in the '.html'
I even had other java scripts functions saved in that script.js file and they're working just fine with onclick events.
Anyway thanks again, and goodnight