6. Can't get what's wrong


/*jshint multistr:true */

text="Julia has a fox which was  named Julia which has a toy called  Julia";
var myName= "Julia";
var hits= [];

for(var i=0; i<=text.length; i++){
    if(text[i] === "J"){
       for(var j=1; j<(myName.length+i); j++){
if(hits.length === 0){
    console.log("Your name wasn't found!");

In console I only see this: "TypeError: console.log is not a function" Where is a mistake?


Hi in your for loop you put j=1 instead of j=i


Hello,thanks! I fixed it, but the problem is still here.
Upd. everything is fine, thanks again! :slightly_smiling: