Update scripts/hangman.js

changed the format so it can work