Update index.js

clear input after press enter.