Caution:
When naming variables, you should avoid using names that are identical to the names of any XML Form Object Model properties, methods, or object names. For information about XML Form Object Model properties, methods, and objects, see Scripting Reference.
TextField1 = firstName
TextField2 = lastName
NumericField1 = age
Concat( “Dear “, firstName, lastName )
In JavaScript, you reference variable values by using the .value property instead of the .rawValue property that is used for field and object values, as shown in this example:
TextField1.rawValue = firstName.value;
See also 

Using variables in calculations and scripts