Skip to content

Instantly share code, notes, and snippets.

@MaxXxiMast
Created June 24, 2019 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaxXxiMast/96cf005fb0d30791cc58c9c33ed1666e to your computer and use it in GitHub Desktop.
Save MaxXxiMast/96cf005fb0d30791cc58c9c33ed1666e to your computer and use it in GitHub Desktop.
How a ++ operator works
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