I had a number stored in local storage and I wanted to check it against a constant number.
But, the check failed even when the numbers were the same. I then learned that everything stored in local storage is stored as as string. your data).
I put the unary operator
+ in front of the value read out of local storage,
and the problem was resolved.