What's wrong with my code? i read all the related topic but still don't get the right code to pass through


var text= ["Tamas asdasd Tamas asdasd, asdasdasdasdasda Tamas"]
var myName = ("Tamas");
var hits = [];

for(var i = 0; i < text.length; i++) {
if (text[i] === "T") {
for(var j = i; j < (myName.length + i); j++) {


Go back to lesson 1 and study the example. That should give you an idea of what is wrong above.


for some reason, in your case text contains an array, this should be a string

Not sure why you use parentheses in this line:

var myName = ("Tamas");


Thank you, now i see it...sorry for the stupid question