Guest User

Untitled

a guest
Jan 16th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. //An anonymous function expression that accepts a single parameter (username)
  2. const printName = function (username){
  3. return "Your name is : " + username;
  4. }
  5.  
  6. //To invoke the function,i will call printName and give it a parameter e.g "Simba"
  7. // or "David" or "Mary" etc , try it and use your own name!
  8. printName("Simba"); // will output : "Your name is : Simba"
  9. printName("David"); // will output : "Your name is : David"
Add Comment
Please, Sign In to add comment