title: "array is not a function" error
body: <p>I'm trying to create a JS script that does the following in Photoshop:</p>
  
  <pre><code>var textarray = array("Hello World", "Good morrow", "top of the morning");
  </code></pre>
  
  <p>For each word in the array</p>
  
  <ol>
  <li>Open new document</li>
  <li>Write the word onto a layer</li>
  <li>Run a photoshop action</li>
  <li>Save and close</li>
  </ol>
  
  <p>This is my code so far..</p>
  
  <pre><code>var textarray = [ "Hello World", "Good morrow", "top of the morning" ];
  
  
  for (x=0; x &lt; textarray.length(); x++) {
  
  
  #target photoshop
  app.bringToFront();
  
  var strtRulerUnits = app.preferences.rulerUnits;
  var strtTypeUnits = app.preferences.typeUnits;
  app.preferences.rulerUnits = Units.INCHES;
  app.preferences.typeUnits = TypeUnits.POINTS;
  
  var docRef = app.documents.add(7, 5, 72);
  
  // suppress all dialogs
  app.displayDialogs = DialogModes.NO;
  
  var textColor = new SolidColor;
  textColor.rgb.red = 255;
  textColor.rgb.green = 0;
  textColor.rgb.blue = 0;
  
  var newTextLayer = docRef.artLayers.add();
  newTextLayer.kind = LayerKind.TEXT;
  newTextLayer.textItem.contents = textarray[x];
  newTextLayer.textItem.position = Array(0.75, 0.75);
  newTextLayer.textItem.size = 36;
  newTextLayer.textItem.color = textColor;
  
  app.preferences.rulerUnits = strtRulerUnits;
  app.preferences.typeUnits = strtTypeUnits;
  docRef = null;
  textColor = null;
  newTextLayer = null;
  
  // DO ACTION HERE 
  //CLOSE AND SAVE
  }
  </code></pre>
  
  <p>It's the array part that isn't working for some reason.. error 24: textarray.length is not a function</p>