title: How to declare a custom class in google scripts?
body: <p>I want to create a class inside my script.</p>
  
  <p>Google Apps Script language is based on javaScript, so I took an example from a javaScript manual:</p>
  
  <pre><code>class Polygon {
    constructor(height, width) {
      this.height = height;
      this.width = width;
    }
  }
  </code></pre>
  
  <p>However, this doesn't work. I get this error message:</p>
  
  <pre><code>Missing ; before statement. (line 1, file "Code")
  </code></pre>
  
  <p>Does that mean it's not possible to create new classes in google scripts?</p>
  
  <p>Or is there a different syntax I'm supposed to use?</p>