Update script.js

Added comments.