title: A constructor, method, accessor, or property was expected. src/app/app.component.ts(129,1): error TS1128: Declaration or statement expected
body: <p>i'm getting this error
   error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
  src/app/app.component.ts(129,1): error TS1128: Declaration or statement expected.
  in angular 6</p>
  
  <pre><code>const dataList = Object.keys(this.data).map(key =&gt; this.data[key]);
    let contents = this.dataList.map(d =&gt; Object.keys(d).map(key =&gt; d[key]))
  
    if(contents &amp;&amp; contents.length) {
    var firstData = contents[0];
  
    firstData.forEach((content,ind) =&gt; {
    contents.forEach((content,index) =&gt; this.resultData[index] = content[ind]);
    this.resultList.push(this.resultData)
    })    
    } 
  </code></pre>
  
  <p>how to declare a variable in angular 6</p>