Update script.js

updated to include notes/documentation