Created updateBasket method to keep code DRY in recipe_list.js and create_basket.js