Created
September 26, 2019 06:30
-
-
Save AkashRajvanshi/0698f37d5510b4638fd2b5d02dbc9492 to your computer and use it in GitHub Desktop.
"this" in simple Function
This file contains 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
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