updated script.js

Added more comments to the script

Simplified the Do While loop for input.  The while loop now passes the
function for user input to continue directly rather than using a varable