The Day I Stopped Writing Spaghetti Code in JavaScript

My JavaScript used to look like the disorganized bedroom of a teenager: random functions stacked on top of one another, everything…