Skip to content

Instantly share code, notes, and snippets.

@AkashRajvanshi
Created September 26, 2019 06:30
Show Gist options
  • Save AkashRajvanshi/0698f37d5510b4638fd2b5d02dbc9492 to your computer and use it in GitHub Desktop.
Save AkashRajvanshi/0698f37d5510b4638fd2b5d02dbc9492 to your computer and use it in GitHub Desktop.
"this" in simple Function
function foo (firstName, lastName) {
console.log(this) //window
console.log(`${firstName} ${lastName}`) //Akash Rajvanshi
}
foo("Akash", "Rajvanshi")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment