Update script.js

Changed to check to see if "u" or "d" is already in the array