Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

global and function scoped

node v10.17.0
version: master
endpointsharetweet
// Initialize a global variable var digimon = "Agumon"; function evolution() { // Initialize a local, function-scoped variable var digimon = "Greymon"; console.log(digimon); } // Show the result console.log(digimon); evolution(); console.log(digimon);
Loading…

no comments

    sign in to comment