Update script.js

fix console bug