5 Need help, Cant seem to figure this out


#1

/*jshint multistr:true */
var text = "Hey, how are you \
doing? My name is Colby.";
var myName = "Colby";
var hits = [];
for (var i = 0; i < text.length; i++){
if(text[i] === "C"){
for(var j = i; j < i + myName.length;j++{
hits.push(text[j])
}
}
}

Getting syntax error unexpected token {


#2

this line:

for(var j = i; j < i + myName.length;j++{

a missing closing bracket ()) after j++ to close your for loop