title: Google Apps Script: How to get the first four files in a folder
body: <p>I am currently using the following code to retrieve a folder and the files within:</p>
  
  <pre><code>var folder = DriveApp.getFolderById(folderId);  
    var contents = folder.getFiles();
  </code></pre>
  
  <p>If it is possible, I would like to create a variable containing only the first four files that the above code finds.</p>
  
  <p>Thank you for your help,
  Connor</p>