Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //An anonymous function expression that accepts a single parameter (username)
- const printName = function (username){
- return "Your name is : " + username;
- }
- //To invoke the function,i will call 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"
Add Comment
Please, Sign In to add comment