For the first one, you’re actually changing the value property. For the second one, you’re saying that the value is equal to 1. Essentially like 0 = 1.
The second one does not work. More explanation. For the first one, the intvalue has been defined. But for the second one, you are setting a variable with the value nil to 1.