Update script.js

Removed notes. Added comments for better understanding.