Javascript code for shopping list