title: Javascript 'TypeError: string is not a function'
body: <p>This is running on applab, I am being given an error on line 55 of my code. It says TypeError: string is not a function. I can't seem to figure out if it's the function that it is in or somewhere in the code above that isn't running properly, it would be much appreciated if someone could take a look and see what the problem is. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>onEvent("startButton", "click", function() { 
    setScreen("safeScreen");
    endGame();
  });//changes to the main games screen,after 2 minutes ends game
  onEvent("retryButton", "click", function() { 
    setScreen("welcomeScreen");
  });// changes screen to welcome screen from win screen
  onEvent("againButto", "click", function() {
    setScreen("welcomeScreen");
  });//changes screen to welcome screen from lose screen
  
  function endGame(){
    setTimeout(function(){
      setScreen("loseScreen");
    },120000);
  }
  var input1=0;
  setText("comboDisplay1",input1);//sets display1 to 0
  var input2=0;
  setText("comboDisplay2",input2);//sets display2 to 0
  var input3=0;
  setText("comboDisplay3",input3);//sets display3 to 0
  onEvent("upButton1", "click", function(){
    input1 = input1 + 1;
    setText("comboDisplay1",input1);
  });//when up button1 is pressed the number display changes
  onEvent("upButton2", "click", function(){
    input2= input2 + 1;
    setText("comboDisplay2",input2);
  });//when up button2 is pressed the number display changes
  onEvent("upButton3", "click", function(){
    input3= input3 + 1;
    setText("comboDisplay3",input3);
  });//when up button3 is pressed the display changes
  onEvent("downButton1", "click", function(){
    input1 = input1 - 1;
    setText("comboDisplay1",input1);
  });//when down button1 is pressed the number display changes
  onEvent("downButton2", "click", function(){
    input2 = input2 - 1;
    setText("comboDisplay2",input2);
  });//when down button2 is pressed the number display changes
  onEvent("downButton3", "click", function(){
    input3 = input3 - 1;
    setText("comboDisplay3",input3);
  });//when down button3 is pressed the number display changes
  
  var playerInput;
  var combination;
  combination = [randomNumber(0,9),randomNumber(0,9),randomNumber(0,9)];//generates a random list of 3 numbers from 0 to 9
  console.log(combination);
  
  playerInput += getText("comboDisplay1","comboDisplay2","comboDisplay3");//assings the display numbers to the variable playerInput
  function yellowLight() {
    if (getNumber("comboDisplay1") != combination(0)) {
      if (getNumber("comboDisplay1") == (combination(1)||combination(2))) {
        showElement("yellowLight1");
      }
    }
    if (getNumber("comboDisplay2") != combination(1)) {
      if (getNumber("comboDisplay2") == (combination(0) || combination(2))) {
        showElement("yellowLIght2");
      }
    }
    if (getNumber("comboDisplay3") != combination(3)) {
      if (getNumber("comboDisplay3") == (combination(0) || combination(1))) {
        showElement("yellowLight3");
      }
    }
  }
  function greenLight(){
    if(getNumber("comboDisplay1") == combination(0));
      showElement("greenLight1");
    if(getNumber("comboDisplay2") == combination(1));
      showElement("greenLight2");
    if(getNumber("comboDisplay3") == combination(2));
      showElement("greenLight3");
  }
  //checks and shows a green light if the number is correct and in the right place
  onEvent("submitButto", "click", function(){
    if( playerInput== combination){
      greenLight();
    }
      yellowLight();
  });</code></pre>
  </div>
  </div>
  </p>