I recently encountered a situation while working on an Angular 4 application. I attempted to add 1 to the parameter value of a method, but ran into some unexpected results.
For example, when the method receives 1 as the parameter value, I wanted to add the parameter value + 1 inside the method. However, instead of returning 2, it returns 11.
addCount(mCount){
mCount += 1;
console.log(mCount);
}
If anyone has any insights or solutions to this issue, it would be greatly appreciated. Thank you!