title: .toUppercase() Function in Google App Script - How to capitalize using Google Script
body: <p>I'm trying to capitalize some letters in my code, but everything I've found online hasn't worked. Does anyone know what I can do?</p>
  
  <p>What I have tried is below this code:</p>
  
  <pre><code>var doc = DocumentApp.getActiveDocument().getBody(); 
  var text = doc.editAsText(); 
  var letter = alphabet[Math.floor(Math.random()*alphabet.length)];
  UPPER(letter); also letter.toUppercase() return letter;
  </code></pre>