title: JavaScript class error on Safari for iOS
body: <p>I made a custom class in Javascript, and although it works perfectly fine on Safari and Chrome in Mac OS, it gives me in error on my iPad.</p>
  
  <p>I'm debugging through the Develop menu on Safari to get the error. What's weird, is that there are no results online I can find out more about it. The error is "Unexpected use of reserved word 'class'".</p>
  
  <p>My JS:</p>
  
  <pre><code>class LoadingIndicator{ // error is here
  
      constructor(elementID){
  
          this.tick = 8;
  
          this.waitStatus = document.getElementById(elementID);
  
          this.animateLoaderVar = setInterval(
                                      this.animateLoader.bind(this),
                                      10
                                  )
  
      }
  
      animateLoader (){        
  
          if(this.tick == 8){
  
              this.waitStatus.firstElementChild.innerHTML = ".";
  
          }
          else if(this.tick == 16){
  
              this.waitStatus.firstElementChild.innerHTML = "..";
  
          }else if(this.tick == 24){
  
              this.waitStatus.firstElementChild.innerHTML = "...";
  
              this.tick = 0;
  
          }
  
          this.tick += 1;
  
      }
  
      removeLoader(){
  
          this.waitStatus.outerHTML = "";
          delete this.waitStatus;
  
          clearInterval(this.animateLoaderVar);
  
      }
  
  }
  </code></pre>