Last active
January 14, 2019 12:25
-
-
Save Maccauhuru/4bb6ff24c98ea507b5b9c86ed5311468 to your computer and use it in GitHub Desktop.
Function Expression Example
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
//A simple function expression named userName that accepts username as an input parameter | |
const userName = function printName(username) { | |
return "Your name is : " + username; | |
} | |
//To invoke the function , i will call its name (userName) and give it a parameter e.g "Simba" | |
// or "David" or "Mary" etc , try it and use your own name! | |
userName("Simba"); // will output : "Your name is : Simba" | |
userName("David"); // will output : "Your name is : David" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment