Created
November 2, 2019 13:49
-
-
Save AkashRajvanshi/e97dbaa55c59db3cb6f29a79bb8b3529 to your computer and use it in GitHub Desktop.
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 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