title: Why can't we define variables using var or let keyword in classes in typescript like this:
body: <pre><code>class area {    
      var length; 
  
      let width; 
  
      length:number;  // why do i need to do like this only;
      width: number;   // why do i need to do like this only;
  
      ...     
      ... 
  }
  </code></pre>