title: Prompt JavaScript If Else Unexpected Token else
body: <p>I'm teaching myself JavaScript using Code Academy and I'm trying to make some simple code so that when prompt asks a question, the user reply gives a response. </p>
  
  <p>example.</p>
  
  <pre><code>prompt says "what's your favourite colour?"
  
  user says "blue"
  
  response "that's the same colour as the sky!"
  </code></pre>
  
  <p>But when I try to add different options, I get  Syntax error: unexpected token else.</p>
  
  <p>I tried making it so that if I asked a question, the reply gets a response but anything else gets a response.</p>
  
  <p>Here's the code.</p>
  
  <pre><code>prompt("what do you want?");
  
  if ("coke");
  {console.log ("no coke, pepsi.")};
  else
  console.log ("pepsi only.")};
  </code></pre>
  
  <p>If anyone has any ideas, I'd be very grateful!</p>