Skip to content

Instantly share code, notes, and snippets.

@maheswaranapk
Last active December 16, 2017 05:17
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 maheswaranapk/e934111cef00eed10c3f2ddceb83226c to your computer and use it in GitHub Desktop.
Save maheswaranapk/e934111cef00eed10c3f2ddceb83226c to your computer and use it in GitHub Desktop.
function createVariable() {
x = 10;
}
function updateVariable() {
x++;
};
function printVariable() {
console.log(x)
}
createVariable();
printVariable(); // 10
updateVariable();
printVariable(); // 11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment