'Is it OK to use "type" as a variable name? [duplicate]
let type = "HI";
console.log(type)
I know its not a reserved word but its showing in blue color while taking as a variable so got a doubt?
Solution 1:[1]
Per this documentation, type is not reserved word for now or near future.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar
Note that typeof is reserved word. So, it is a matter of readability and naming conventions that you/your team may follow.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jagrut Sharma |
