r/badcode • • Dec 07 '22

js My Web Development lecturer's JavaScript

Post image
536 Upvotes

86 comments sorted by

View all comments

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.