I'm not sure what the main question is, but I'll try answering the sub-questions.
Now, what I think is happening based on what you wrote and what I've been trying to figure out, is that the "test" array will never match the "myName" variable because one is a string and the other is an array. But in this case, instead of returning an empty array, shouldn't it return "Your name wasn't found!" because hits should be 0?
Let's try it out in the Javascript console!
['T','E','S','T'] == ['T','E','S','T']
> falseIt looks like two arrays won't match even if they have the 'same' content.
I don't see any "test"s in the code you posted though. Did you make sure to post the right version of your code?
Can you explain what "test = test.concat(text[j])" means and how it works?
Here's a documentation link. Googling for whatever usually turns up help. It says:
The concat() method returns a new array comprised of the array on which it is called joined with the array(s) and/or value(s) provided as arguments.
So... if you have
var A = ["T", "E"]
var B = ["S", "T"]
var C = A.concat(B)
C would be ["T", "E", "S", "T"]
A, B would be unaltered.
There are more examples on the linked page!
(as an aside, doing A + B gives you a
string with the content "T,E,S,TT,E,S,T")
I'm assuming that "log.push" is the same as "console.log"?
I have never seen log.push before, so I'm assuming it's a CodeAcademy-only construct.