When I define the variable name with
let name = 'synergy';
and the try to log it to the console using
console.log(name);
it executes fine but vscode crosses out name:
I'm not sure what to do or why vscode is doing it.
When I define the variable name with
let name = 'synergy';
and the try to log it to the console using
console.log(name);
it executes fine but vscode crosses out name:
I'm not sure what to do or why vscode is doing it.
In a browser, the global name variable has special meaning. It might be your linter just detecting and confusing the name word for your variable. Try changing the name to something else, and see if it is still crossed out.
Hope I helped!