Created
June 24, 2019 13:15
-
-
Save MaxXxiMast/96cf005fb0d30791cc58c9c33ed1666e to your computer and use it in GitHub Desktop.
How a ++ operator works
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function plusplus(orig_x){ | |
let orig_x_changed = Number(orig_x); | |
x = orig_x_changed + 1; | |
return orig_x_changed; | |
} | |
let x = '2'; | |
plusplus(x); // 2 | |
x; // 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment