146k views
4 votes
Required Exercise Functions Part 3

Create a function named fullNameAndAge that accepts 3 parameters called firstName, lastName and age.
Within fullNameAndAge, call the fullName function by passing in firstName and lastName variables as parameters into it and store the result of that function in a variable named result.
Now return the full name as the age separated by a comma and a space. (e.g fullNameAndAge(“Jane”, “Doe”, 23) would return 'Jane Doe, 23'

Required Exercise Functions Part 3 Create a function named fullNameAndAge that accepts-example-1

1 Answer

5 votes

Hello, view the image and try the code out. I used visual studio code and Chrome browser and outputted to the console.log as you can see in the image.

Required Exercise Functions Part 3 Create a function named fullNameAndAge that accepts-example-1
User Edgar Asatryan
by
6.7k points