fill not defined in JavaScript?

281 Views Asked by At

So I am making a number analyzer code in JavaScript and previously i was using https://www.khanacademy.org to write the code and run it in their live editor but that doesn't allow me to run window.prompt so i shifted to some other editors but all of them are giving me an error when I try to fill something with color like this:

fill (255, 0, 0);

error: JavaScript error: Uncaught ReferenceError: fill is not defined on line 3 why is this happening and how can i fix it?

1

There are 1 best solutions below

0
Maxime Helen On BEST ANSWER

fill is an helper function that is only available in your course environment. window.prompt is probably disabled to avoid pranks that show thousand of dialogs lol