Have you got a very old version of VSCode running, or have you installed a linter plugin (eg jshint) over the top of the one it ships with? Because you shouldn’t be getting those errors otherwise
Sorry, I’m very new to coding. What do you mean by installing a linter plugin over the top of the one it ships with?
What I mean is that if you install VSCode on your computer, it works, out of the box, with modern JS syntax; that’s what it’s built primarily to do. It shouldn’t be highlighting what is valid code with errors.
Oh, I understand. I had installed a jshint extension and as soon as I disabled it, I didn’t get any errors and the ES6 code worked.
Yup, you don’t need it, it’s already got it set up and ready — ESLint is what’s used (and is the current de facto standard) I would avoid JSHint