Error submitting my first add on

I am getting this error which I can not understand.

I am getting syntax error and all I have in that js/core.js line 62 column 13 which is
let image = document.createElement(“img”);
image.src = this.ImageUrl; <-- This is the point of error

Can someone tell me how to resolve this?


Error is pointed to this line
class AmazonItem{

ImageUrl;       ---------- this line --------


Probably same issue as here:

Also to paste code here, place ``` on the line before and after the code to enable syntax highlight.

Regarding possible solutions here:

  1. use Babel to transpile your code to older version
  2. use TypeScript :slight_smile: which can also generate older code but supports many new features not yet available in javascript
  3. fix the linter? Probably not an easy task :frowning:
  4. don’t use public fields yet. Just keep the initialization in the constructor without explicit declaration in the class body.
1 Like