I am new to JS. I installed a free Lynda course on Functional Javascript for ES6. This required installing npm and Node, which appear to be OK.
Now in vscode, when I type the first line of a .js file, it does not recognise const or let.
It accepts var but then doesn't recognise the => element.
The line I typed is const sayHello = name => console.log(`Hello ${name}`);
I get yellow wavy lines under const and => and `H.
I have searched vscode Settings but cannot find anything relevant.
This has happened before, so it's not a simple mistake on my part, as far as I can see.
No point doing the course if I'm stuck in ES5. How do I convert to ES6? I am running a Mac with Catalina 10.15.7. Can anyone help?