updated script.js

Fixed an error in the input validation where it was incorrectly
checking to see if the input was a number or not, this is now correctly
working