0
code JavaScript in html occuring that function isn't defined
when calling JavaScript function with button onclick in html, it says the function is not defined .Is something wrong with order? https://code.sololearn.com/WShRnUYqcpE1/?ref=app
3 Answers
+ 2
In the app, the console pops up and reports "Uncaught SyntaxError: Unexpected identifier on line 40", which is this line:
q2.fillStyle(a3[(3i+i1-1)]);
Script instances with errors are rejected, which is why draw() is undefined.
Do you mean to multiply 3*i ?
Note, if you're on the website and not seeing errors, you may need to open the javascript console for your specific browser.
+ 2
EricWu2 It's a property, not a function:
https://www.w3schools.com/Tags/canvas_fillstyle.asp
0
i run code on this app build in browser
i have replace 3i with 3*i
why it says q2.fillStyle is not a function?