Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Scope example of a global function
- var global_variable = 5;
- function simplefunc() {
- console.log(global_variable);
- }
- simplefunc(); // prints '5' => 당연!
- global_variable = 6;
- simplefunc(); // prints '6' => 역시 당연!
Add Comment
Please, Sign In to add comment