Last active
January 14, 2019 04:48
-
-
Save Maccauhuru/00895542c29b8081efd1c962b5734693 to your computer and use it in GitHub Desktop.
Function Declaration 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 declaration named printName that accepts username as an input parameter | |
function printName(username) { | |
return "Your name is : " + username; | |
} | |
//To invoke the function , i will call its name (printName) and give it a parameter e.g "Simba" | |
// or "David" or "Mary" etc , try it and use your own name! | |
printName("Simba"); // will output : "Your name is : Simba" | |
printName("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