Skip to content

Instantly share code, notes, and snippets.

@julsfelic
Created November 11, 2014 20:28
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 julsfelic/6bb3b184ced14c5c3512 to your computer and use it in GitHub Desktop.
Save julsfelic/6bb3b184ced14c5c3512 to your computer and use it in GitHub Desktop.
var name = "Julian";
console.log(name);
console.log(window.name);
function sayHello(name) {
console.log("Hello there, " + name + "!");
}
sayHello(name);
window.sayHello(window.name);
console.log(window); // If you expand the object and scroll towards the bottom
// you will see both your variable and function on the
// window object!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment