+ 1
Please help me with my code please
5 Antworten
+ 4
Uddhav Joshi In addition to the fix by Pariket, the markup element for the "Reset" button isn't properly closed.
Great job with attempting to build things like this for practice as you are learning.
If you're curious about how this might look after you've gotten a little more experience, here's a simplified version of your code.
https://code.sololearn.com/WdMEJbl4A2Jr/?ref=app
+ 3
visph Noice! 👌
I cleaned up my 1st revision and then changed it up a little in a 2nd revision.
Okay... I might have taken it up another notch in the 2nd revision... but only a tiny smidge. 😂🤣
https://code.sololearn.com/WhjQQtmMZVaB/?ref=app
Note... this 2nd revision is all about flexibility, reusability, and decoupling from the id attribute to define the color.
Also... be aware that the error appearing in the console is intentional to demonstrate some basic error handling. 😉
+ 1
alternative refactored code:
https://code.sololearn.com/WswQXi6uOkKJ/?ref=app
0
Thank you so much