Update index.js

fixed .replace code, and added score update for the hint buttons