Skip to content

Instantly share code, notes, and snippets.

@rehasantiago
Created March 26, 2022 18:05
Show Gist options
  • Save rehasantiago/2d3ff16d7020d3f6802bc3e2517db398 to your computer and use it in GitHub Desktop.
Save rehasantiago/2d3ff16d7020d3f6802bc3e2517db398 to your computer and use it in GitHub Desktop.
Revealing the mystery behind this - https://readosapien.com/revealing-the-mystery-behind-this
var singer = {
name: "Dua Lipa",
songs: function() {
function songAndSinger() {
console.log(this === singer) // true
}
songAndSinger.call(singer);
}
}
singer.songs();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment