doing math on a variable
I am trying to make a simple number guessing game, the game itself works, but I wanted to make an attempt limit at 3. I made a variable for the turns as 3 and make the variable a number value, however, on my if statement i make the logic that if the guess value doesn't equal the random number, then it would subtract 1 from the turns value, then when the turns variable hit zero, it would give a message that you had no more attempts. But when I do that logic it comes up as a unexpected number or undefined. What would be a solution to this?