6/7 SyntaxError: Unexpected token )


I receive this when I Save and Submit -SyntaxError: Unexpected token )

/*jshint multistr:true */

var text = "Dave alsjhdaljsdasd Dave asisodiajad Dave ioajsdioasjdas Dave";

var myName = "Dave";
var hits=[]
for (var i=0; i<
text.length; i++){
if (text[i]==="D")

if (hits.length === 0){
console.log("Your name wasn't found!")
else {


After your if statement you always need to have an opening curly bracket ( { ) and then there should be another for loop in the if statement using the second variable "j". Let me know if you need more help with this.

Some syntax errors in your code are towards the bottom. After you log something there should always be a semi-colon. With that being said the semi-colon at the end of all the code is redundant.