Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // function declaration
- function formatAge(name, age) {
- const formattedAge = name + " is " + (age * 7) + " in dog years.";
- return formattedAge;
- }
- // function invocations
- const lassie = formatAge('Lassie', 6); // 'Lassie is 42 in dog years.'
- const wishbone = formatAge('Wishbone', 5); // 'Wishbone is 35 in dog years.'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement