Skip to content

Instantly share code, notes, and snippets.

@AkashRajvanshi
Created November 2, 2019 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AkashRajvanshi/e97dbaa55c59db3cb6f29a79bb8b3529 to your computer and use it in GitHub Desktop.
Save AkashRajvanshi/e97dbaa55c59db3cb6f29a79bb8b3529 to your computer and use it in GitHub Desktop.
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