4 ms·
Congrats kid! It's a fun app incorporating strategic and visual play. The code is well structured and clean. `onclick` handlers inline are a great way to get g
by taylorbuley 2y ago
Congrats kid! It's a fun app incorporating strategic and visual play. The code is well structured and clean.
`onclick` handlers inline are a great way to get going with interactivity. One possible improvement could be to add event listeners dynamically after `load`.
Another challenge might be to move stuff outside of the global namespace, especially variables. For a challenge and possible improvement, see if you can implement a Singleton pattern.
Start practicing now with inline comments. In HTML and in JS. Build that as a good habit early -- it will save you and those around you countless hours in the future.
- veesahni 2y agothank you for your feedback!
- ivanjermakov 2y agoI would suggest instead of inline comments write block comments, describing the behavior of a function or reasonably big and not straightforward section of code. Basically documenting what is not obvious just reading it without context.
- immibis 2y agoI'm down voting this because two of these three suggestions make the code more complicated for no actual improvement and probably aren't advice that will help a 9 year old, in my opinion.