Skip to content

Instantly share code, notes, and snippets.

@zonayedpca
Last active March 29, 2018 17:40
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 zonayedpca/428a484728f1e329ffad2a433ca81c37 to your computer and use it in GitHub Desktop.
Save zonayedpca/428a484728f1e329ffad2a433ca81c37 to your computer and use it in GitHub Desktop.
Basic Function
function changeValue(a) {
console.log('Value of a inside function before changing: ' + a);
a = 10;
console.log('Value of a inside function after changing: ' + a);
return a;
}
var a = 100;
console.log('Value of a before changing function is applied: ' + a);
changeValue(a);
console.log('Value of a after changing function is applied: ' + a);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment