[Solved] Unexpected end of input Error in a simple code


Your if statement isn’t closed well.
Try this:

 var array1 = [1,2,3]
 var l

 for (l = 0; l < (array1.length-1); l++) {
   if (array1[l] == 1) {
     alert("what?")
  } 
 }

You had this

if( ... ) { {

Should be

if( ... ) { }

0

solved Unexpected end of input Error in a simple code