title: Printing to the console in Google Apps Script?
body: <p>I am very new to programming (have taken some of the JS courses on Codecademy). I am trying to create a simple script to determine, if given a spreadsheet with results from a poker game, who should pay whom. I opened up Google Apps Script, and wrote the following to get started:</p>
  
  <pre><code>function addplayerstoArray(numplayers) {
  
    var playerArray = [];
  
    for (i=0; i&lt;numplayers; i++) {
      playerArray.push(i);
    }
  }  
  
  addplayerstoArray(7);
  
  console.log(playerArray[3])
  </code></pre>
  
  <p>The idea is to create an array with the total number of players in it. When running the code, I thought it would print "3" to the console. But nothing happened. It said </p>
  
  <blockquote>
    <p>"ReferenceError: "console" is not defined." </p>
  </blockquote>
  
  <p>A) What do I not understand about how the Google Apps Script console works with respect to printing so that I can see if my code is accomplishing what I'd like?</p>
  
  <p>B) Is it a problem with the code?</p>