title: how to set two variables for a for loop - Javascript
body: <p>I want to set two variables in a <code>for</code> loop in JavaScript. </p>
  
  <pre><code>function onOpen(cf) {
  var ss = SpreadsheetApp.getActive();
  var startRow = 2;  // First row of data to process
  var numRows = 4;
  var sheet1 = ss.getSheetByName("Sheet1");
  
  
  //for (var n in ss.getSheets()){ {
  
  for (var ree = startRow,  n in ss.getSheets(); ree &lt;= numRows; ree++){ {
  
  var rangeToCheck = sheet1.getRange(ree, 1);//  column D in row ree
  
  var accesslist = sheet1.getRange(ree,2);
  var namee = rangeToCheck.getValue();
  var folder =  DriveApp.createFolder(namee);
  </code></pre>
  
  <p>This doesn't seem to work. Does anyone know any alternatives?</p>