In line No. 12 it should be pre increment instead of post increment or it is not showing the correct result when we are clicking the button. In line No. 22 ,I have used the addition assignment operator to make the code small and identical to other addition lines. In line No. 38 it should be pre decrement instead of post decrement or it is not showing the correct result when we are clicking the Remove from cart button.
In line No. 12 it should be pre increment instead of post increment or it is not showing the correct result when we are clicking the button. In line No. 22 ,I have used the addition assignment operator to make the code small and identical to other addition lines. In line No. 38 it should be pre decrement instead of post decrement or it is not showing the correct result when we are clicking the Remove from cart button.