Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function sayName(firstName, lastName) {
console.log(`${firstName} ${lastName}`)
}
sayName('Akash', 'Rajvanshi') // Akash Rajvanshi
// We can also call the function through call.
// first Parameter passed into the function call replaces the this context.
// Other values passed into the functions behave as normal agrguments
sayName.call(null, 'Akash', 'Rajvanshi') // 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.