Skip to content

Instantly share code, notes, and snippets.

@mauroc8
Last active August 28, 2021 03:05
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 mauroc8/f32eac5f83bb5e5f7e49ee653486087d to your computer and use it in GitHub Desktop.
Save mauroc8/f32eac5f83bb5e5f7e49ee653486087d to your computer and use it in GitHub Desktop.
// Cada una de estas líneas se puede ejecutar en la consola de un navegador:
window; // El scope global. Todas las variables globales viven acá, por ejemplo:
var a = 6;
window.a === 6;
requestAnimationFrame === window.requestAnimationFrame;
setTimeout === window.setTimeout;
addEventListener === window.addEventListener;
onload === window.onload;
// Pero en realidad esto pasa solamente usando `var`.
let b = 5;
window.b === undefined;
// (Esta es una de las razones por las que se prefiere `let`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment