Skip to content

Instantly share code, notes, and snippets.

@Maccauhuru
Last active January 14, 2019 04:48
Show Gist options
  • Save Maccauhuru/00895542c29b8081efd1c962b5734693 to your computer and use it in GitHub Desktop.
Save Maccauhuru/00895542c29b8081efd1c962b5734693 to your computer and use it in GitHub Desktop.
Function Declaration Example
//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