Reserved keywords as variable names with escaping
See original GitHub issuevar \u{63}ase = 123;
outputs
var case = 123;
which is invalid.
I had no idea you could even write that! This happens for all the reserved words (switch
, let
, var
…). The proper fix is likely to escape the first character for all of them.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
TS: Escaping reserved keyword and use as variable name
My problem is that I'm getting incoming json to my front with variable name "is-saved" , how can I use it in my...
Read more >Reserved Keywords as Variable Names Using C# - C# Corner
An explanation of how to save reserved keywords as variable names using ... string constructor to ignore escape characters and line breaks.
Read more >How to name something when the logical option is a reserved ...
In C# you can use the " @ " prefix to escape reserved keywords so they can be used as identifers (like @default...
Read more >Keywords - Visual Basic | Microsoft Learn
The following keywords are reserved, which means that you cannot use them as names for programming elements such as variables or procedures.
Read more >C++. Identifiers, reserved words, literals, escape sequences
Identifiers can consist of one or more characters. Variable names must begin from a letter or underscore. In C++, uppercase and lowercase ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yeah I believe it just means https://github.com/babel/babylon/issues/206 would need to be fixed
OMG you can write that??