[ 
https://issues.apache.org/jira/browse/JEXL-369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17533470#comment-17533470
 ] 

Henri Biestro edited comment on JEXL-369 at 5/8/22 2:12 PM:
------------------------------------------------------------

Final behaviour is that using let/const will fail any attempt to re-declare a 
variable  within the same lexical scope, be it happening before via 
var/let/const or after via var/let/const.

In JS, all permutations of those 3 declarations will fail:
{code}
var number = 12;
let number = 21;
const number = 42;
{code}



was (Author: henrib):
Final behaviour is that using let/const will fail any attempt to re-declare a 
variable  within the same lexical scope, be it happening before via 
var/let/const or after via var/let/const.

In JS, all permutations of those 3 declarations will fail:
{code:javascript}
var number = 12;
let number = 21;
const number = 42;
{code}


> Add 'let' and 'const' variable declarations
> -------------------------------------------
>
>                 Key: JEXL-369
>                 URL: https://issues.apache.org/jira/browse/JEXL-369
>             Project: Commons JEXL
>          Issue Type: Improvement
>    Affects Versions: 3.2.1
>            Reporter: Henri Biestro
>            Assignee: Henri Biestro
>            Priority: Major
>             Fix For: 3.3
>
>
> WHAT:
> Add creation of lexical scope variables, modifiable with 'let', 
> non-modifiable through 'const'.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to