I have recently started learning javascript and have already written some code. But at this I don't understand why it doesn't add 1 when the statement is true. It always prints 0.
var test = true
var value = 0
if(test === true){
value + 1
}
console.log(value)
It's how you add the one to the value.
var test = true
var value = 0
if(test === true){
value++
}
console.log(value)