Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
"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
You can’t perform that action at this time.