You have numerous errors, but I think your main problem is that the parameters you are getting via concatenateArray() are hiding your global variables. You shouldn't even need the globals anyway, since you seem to be intending to pass them as arguments...
Angelina, .. u cannot miss passing arguments to ur function!!!
neverthless the heading of the post was catchy.. concatening strings/arrays are my favs :):)