Small fixes made

Just a few grammatical corrections and spacing fixes in the JS code have been made. As this is one of my first pull requests on GITHUB, would you mind giving me feedback so I can know what to improve on? Thank you