Update javascript/main.js

Setting up deleteItem function