Loops - not receiving desired results


var text = "Hello, This is confusing Jake. I dont know what I am doing Jake. What is going on Jake?";
var myName = "Jake";
var hits = [];

for (var i = 0;i<(text.length);i++);
{if(text[i] === 'J');
{for (var j = i; j < myName.length+i;j++);}
}/*jshint multistr:true*/

{console.log("Your name wasn't found!");}

*in the console I am receiving [ ] only. need help I think its because my variable for hits is not in my loop?


Try this rewrite to code but this time just write it neatly with the braces in the right place and each statement neatly written on its line

for(var i = 1; i < 20; i++){
    if(i % 2 === 0){

See how it is neatly written?
Perhaps writing ti that way will help you debug

Now if you want your code to look like how the one i have posted here looks like all you have to do is surround the beginning and end of your code with three backticks(reverse quotes) each like this

 put your code here