title: The cause of SyntaxError: Unexpected identifier in a JavaScript conditional statement based on the length of a string
body: <p>I've created a simple if/else statement like so : </p>
  
  <pre><code>var myName = ["Mark"];
  
  if myName.length &lt;= 3;
  
  {
  
      console.log("It's not true");
  
  }
  else 
  {
  
      console.log("Variable consists of" myName.length);
      console.log("I finished my first course".substring(0,26));
  
  }
  </code></pre>
  
  <p>Unfortunately, the console returns this error : SyntaxError: Unexpected identifier</p>
  
  <p>I've tried to add square brackets to var myName = "Mark"; but it didn't help.  </p>