title: Google Apps Script random string generating
body: <p>i am new to Google apps script, i want to create string of random characters in the code given below in variable body2. </p>
  
  <pre><code>function myfunction() {
  var files = DriveApp.getFiles();
  while (files.hasNext(`enter code here`)) {
  Logger.log(files.next().getName());
  }
  var recipient = Session.getActiveUser().getEmail();
  var subject = 'A list of files in your Google Drive';
  var body1 = Logger.getLog(); 
  var body2;
  for(var i=0;i&lt;6;i++)
  {   
  body2[i]=BigNumber.tostring("Math.floor(Math.random()*11)");
  }
  
    body=body1+body2;
   MailApp.sendEmail(recipient, subject, body);
  };
  </code></pre>
  
  <p>but when i run this function, it says "TypeError: Cannot find function tostring in object 0. (line 12, file "Code") " i can't understand how to solve this error? 
  Why we have to multiply random by 11 , can it be multiplied with any integer number?
  what if i want that string in only capital letters.! </p>
  
  <p>Some other question 
  1) i don't have enough knowledge of JavaScript, is it good to learn GAS directly?
  2) i can't find proper written material or documentation for GAS , the material available at Google's official site is seems to be updating time by time , what to do then ? any link to material would help me .!</p>