I would use this to check and see what is the type of the variable. If it is a string you can convert it to a number then it should work
console.log(typeof totalPinCost);
I would use this to check and see what is the type of the variable. If it is a string you can convert it to a number then it should work
console.log(typeof totalPinCost);