3

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:

screenshot

I'm not sure what to do or why vscode is doing it.

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
Theo Robinson
  • 35
  • 2
  • 6
  • 3
    Does this answer your question? [Why does my variable show it's deprecated?](https://stackoverflow.com/questions/65379554/why-does-my-variable-show-its-deprecated) – Abir Taheer Feb 20 '21 at 05:05

1 Answers1

4

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!

GrimReaper07
  • 455
  • 5
  • 13