title: Java script syntax error: unexpected end of input
body: <p>When I try to run this code, I get this syntax error:</p>
  
  <pre><code>Uncaught syntax error: Unexpected end of input
  </code></pre>
  
  <p>I have been trying to debug this for about 20 mins, but I can't find the error. Could someone help me with this? I'm pretty sure the error is below line 26, because testing it yesterday, it worked up to that line, then there was minor debugging I had to work on. But it could be a simple parentheses or curly bracket error that I just can't see.</p>
  
  <p>Code:</p>
  
  <pre><code> var age = prompt("How old would you like you're character to be?")
  if(age &lt; 0) {
      age = prompt("Your character is too young, please choose a number between 1 and 100.")
       }
  if(age &gt; 100) {
      age = prompt("Your character is too old, please choose an age between 1 and 100.")
      }
  if(age &lt; 0) {
      age = 50
      }
  if(age &gt; 100)
      age = 50)
      }
  var randomString = " Years old"
  confirm("Your character is now " +age +randomString)
  var job = prompt("Choose a job, insert the number into the text box to choose.     1)Teacher  2)Veteranarian  3)Doctor  4)FireFighter  5)Carpenter  6)Driver  7)Chef  8)Accountant  9)Lawyer  10)Mason")
      if(job &gt; 10) {
      var job = prompt("You chose an invalid job, please choose another one. Choose a job, insert the number into the text box to choose.     1)Teacher  2)Veteranarian  3)Doctor  4)FireFighter  5)Carpenter  6)Driver  7)Chef  8)Accountant  9)Lawyer  10)Mason")
      }
  if(job &lt; 1) {
      var job = prompt("You chose an invalid job, please choose another one. Choose a job, insert the number into the text box to choose.     1)Teacher  2)Veteranarian  3)Doctor  4)FireFighter  5)Carpenter  6)Driver  7)Chef  8)Accountant  9)Lawyer  10)Mason")
      }
  var randomIncome = Math.floor(Math.random()*150001)
  var randomVariable = " Press 'OK' to keep this income, or 'Cancel' to recieve you're jobs specified income."
  var randomOrNot = confirm("Your randomly generatod income is $" +randomIncome +randomvariable)
  if(randomOrNot === true) {
      var income = randomIncome
      }
  else {
      if(job === 1) {
          var income = 45000
          var bankMoney = 450000
          }
      if(job === 2) {
          var income = 50000
          var bankMoney = 500000
          }
      if(job === 3) {
          var income = 125000
          var bankMoney = 1250000
          }
      if(job === 4) {
          var income = 35000
          var bankMoney = 350000
          }
      if(job === 5) {
          var income = 40000
          var bankMoney = 400000
          }
      if(job === 6) {
          var income = 20000
          var bankMoney = 200000
          }
      if(job === 7) {
          var income = 30000
          var bankMoney = 300000
          }
      if(job === 8) {
          var income = 95000
          var bankMoney = 950000
          }
      if(job === 9) {
          var income = 120000
          var bankMoney = 1200000
          }
      if(job === 10) {
          var income = 75000
          var bankMoney = 750000
          }
      }
  confirm("Your income is now $" +income)
  confirm("Your bank balance is now $" +bankMoney)
  var carCrash = Math.floor(Math.random()*50001)
  if(carCrash &gt; 15000) {
      confirm("You were in a car crash, the damages costed you $25,000.")
      bankMoney = bankMoney - 25000
      }
  else {
      confirm("You swerved to avoid a car crash on your way home from work. You were given a trafic ticket that costed $250.")
      bankMoney = bankMoney - 250
      }
  var withdrawl1 = prompt("How much money would you like to withdrawl from your bank account? (withdrawls are taxed 9%) Your current balance is : $" +bankMoney)
  var pocketMoney = withdrawl1 - withdrawl1 * 0.09
  bankMoney = bankMoney + income
  confirm("You recieved pay. Your new bank balance is : $" +bankMoney)
  </code></pre>