Update javascript/main.js

re watching lesson videos and looking over previous work to determine my mistakes