If it's not possible to get around that, double underscore `__` or more `_{2,}`
can be used.
________________________________
From: es-discuss <[email protected]> on behalf of Ed Saleh
<[email protected]>
Sent: Sunday, November 3, 2019 2:47:13 PM
To: Sanford Whiteman <[email protected]>; es-discuss
<[email protected]>
Subject: Re: Optional Curly Braces in JavaScript
How is it a valid identifier? I guess the `_` in my case would be used as a
statement, not as a function and the JavaScript compiler can somehow
distinguish between the different contexts depending on the surrounding
identifiers. To my knowledge `_` is used to make numbers more readable, e.g.
`1_000_000` rather than `1000000`, but here we have a context of numbers, not
expressions or statements.
________________________________
From: es-discuss <[email protected]> on behalf of Sanford Whiteman
<[email protected]>
Sent: Sunday, November 3, 2019 2:41:03 PM
To: es-discuss <[email protected]>
Subject: Re: Optional Curly Braces in JavaScript
The single character
_
*is already a valid identifier* as Ron said.
And not an obscure one (not that that would matter) but rather *the
global object used by the Underscore library*.
You might as well be using
$
here and trying to convince people to stop using it as the top level
of their library.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss