Felgall already answered that question:
... Then arrayPhrase will be the entire string ...
So just do
var text = arrayPhrase;
and then replace all uses of arrayPhrase
after that point with text
But I strongly suspect you are misreading the homework assignment. Or the instructor just used the wrong words. Maybe you should copy the assignment here *VERBATIM*.