0

Why can't the style property work in JavaScript?

https://code.sololearn.com/WPEvju8JXNjB/?ref=app

18th Oct 2017, 7:26 PM
Emily
Emily - avatar
2 odpowiedzi
+ 5
You are using an attribute to describe the color: <... fill = "black" ... /> You want to do something like this: one.setAttribute("fill","blue"); Also remember to add ; at the end of the lines
18th Oct 2017, 8:48 PM
Limitless
Limitless - avatar
+ 5
The way you're about to do it will take very long to code, do you want to know a quicker route? (Not the quickest tho) (Edit) Here it is: https://code.sololearn.com/W2rDNqr5t1LB/?ref=app
18th Oct 2017, 8:49 PM
Limitless
Limitless - avatar