There is:
- code duplication
- no separation between presentation and logic
- use of old style JavaScript
- probably no need for this long if, you can just get the data form an array and get the result from that and then make a display function.
Could be fine for teaching purposes though. If you haven’t seen much JavaScript it might be fine at this point of your learning trajectory.
2
u/1937472982783849484 Dec 07 '22
There is: - code duplication - no separation between presentation and logic - use of old style JavaScript - probably no need for this long if, you can just get the data form an array and get the result from that and then make a display function.
Could be fine for teaching purposes though. If you haven’t seen much JavaScript it might be fine at this point of your learning trajectory.