Why does this code:
var score = 0;
score = ("H".charCodeAt(0) === "H".charCodeAt(0)) ? score += 1 : score;
console.log("score should be one here and it is = " + score);
while this below does not seem to work:
var score = 0;
score = ("H".charCodeAt(0) === "H".charCodeAt(0)) ? score ++ : score;
console.log("score should be one here but its (zero) = " + score);
Looks technically the same to me? Am using nodejs to run this.