Added comments

added comments to outline what’s happening on each line of my js file