Below code, incrementing a quantity using onclick button. Here my doubt is how the index is working on a function increment. I could not understand the approach. Please clar