Search text for your name!


It keeps give me an error message that my code isn't pushing any values into my hits variable!

Replace this line with your code. 
var text = ('huehd eifjiwef ejfbwieu formciso wiuehau cenbdciue Antonio okfiorehf Antonio iawhndiuqhuiebn qwiodnxawiu wdiuawBIU Antonio akjbwhdxwbiujehcni uejnc Antonio');
var myName = ('Antonio');
var hits = []

for (var i = 0; i >= text.length; i++) {
    if (text[i] === 'A'); {
        for (var j = i; j + myName.length;) {


That should be text[j].

Don't forget to increment j in your loop paramaters.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.