Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // function declaration
  2. function formatAge(name, age) {
  3.     const formattedAge = name + " is " + (age * 7) + " in dog years.";
  4.     return formattedAge;
  5. }
  6.  
  7. // function invocations
  8. const lassie = formatAge('Lassie', 6); // 'Lassie is 42 in dog years.'
  9. const wishbone = formatAge('Wishbone', 5); // 'Wishbone is 35 in dog years.'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement