# Exam question help - passing two arguments in function and return

**URL:** <https://forum.kirupa.com/t/exam-question-help-passing-two-arguments-in-function-and-return/328476>\
**Category:** Uncategorized\
**Created:** [May 20, 2012, 9:40am UTC](https://forum.kirupa.com/t/exam-question-help-passing-two-arguments-in-function-and-return/328476 "2012-05-20T09:40:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahanslot](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@ahanslot](https://forum.kirupa.com/u/ahanslot)\
**Post date:** [May 20, 2012, 9:40am UTC](https://forum.kirupa.com/t/exam-question-help-passing-two-arguments-in-function-and-return/328476/1 "2012-05-20T09:40:48Z")

</div>

I [COLOR=#000000][FONT=verdana] have this question any help[/FONT][/COLOR]

[COLOR=#000000][FONT=verdana]c) Write a new function called ‘getFullName2()’ which takes two arguments (firstName and lastName) and replace the code below. Explain the difference.

```auto

[/FONT][/COLOR]
var firstName:String = new String("Tom");var lastName:String = new String("Smith");function getFullName():String{var fullName:String = firstName + " " + lastName;return fullName;}var fullName:String = getFullName(); [LEFT][COLOR=#000000]trace("name is: ",fullName);
[/COLOR][/LEFT]

```

[COLOR=#000000][FONT=verdana]

thanks[/FONT][/COLOR]
