so I have this javascript code:
let version = "v179";
version = (parseInt(version.replace("v","")))++;
console.log("got:",version);
but I get this error: Uncaught ReferenceError: Invalid left-hand side expression in postfix operation
. However it works if I replace the ++
with + 1
any idea why it does that? Why can't I use the increment operator for that?
Thanks in advance.