Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.12 KB | None | 0 0
  1. function foo() {
  2. bar = "I am in global scope";
  3. }
  4. foo();
  5. console.log(bar);
  6.  
  7.  
  8. ReferenceError: bar is not defined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement