Last active
August 28, 2021 03:05
-
-
Save mauroc8/f32eac5f83bb5e5f7e49ee653486087d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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