function removeItem(cart, i){
            var index = cart.items.findIndex(function(item){
                return (item.id == i.id);
            });
            cart.items.splice(index, 1);
        }
/*
        * Removes the item => i from cart
        */
Removes the item => i from cart
Removes the item = > i from cart
function removeItem(cart, i){
            var index = cart.items.findIndex(function(item){
                return (item.id == i.id);
            });
            cart.items.splice(index, 1);
        }
function removeItem ( cart , i ) { var index = cart . items . findIndex ( function ( item ) { return ( item . id == i . id ) ; } ) ; cart . items . splice ( index , 1 ) ; }
Removes the item => i from cart
Removes the item = > i from cart