Your "if" statement


#1

I am stuck here:
https://www.codecademy.com/courses/javascript-beginner-en-XEDZA/0/4?curriculum_id=506324b3a7dffd00020bf661#

Getting error:
SyntaxError: Unexpected end of input


var text = "Lisa Lisa Lisa";

var myName = "Lisa";

var hits = [];

for ( var i = 0; i < text.length; i++) {
    if (text[i] === "L") {
        
};

Anyone see anything glaring I am missing? Thanks!


#2

try this:
var text = ["Lisa, Lisa, Lisa"];
var myName = "Lisa";
var hits = [];

for ( var i = 0; i < text.length; i++)
{
if (text[i] === "Lisa")
console.log(text[i]);

};


#3

Hi it's becasuse you didn't close } the if statetement

for ( var i = 0; i < text.length; i++) {
    if (text[i] === "L") {
  
    } <== add one here      
};

#4

Thank you SO much! Have a great weekend.