Sunday, 17 October 2021

assignment expression in ecma262

consider the following code

var myVar = 'Hola';
{
  let myVar;
  myVar = 'Hello'
}

on line 4(myVar = 'Hello') we are using the Assignment operator

Now when i was looking at ecma262 in Assignment Operators Evaluation

it says that the left side in assignment operators is LeftHandSideExpression and the right side is AssignmentExpression

in other words it looks like that

LeftHandSideExpression = AssignmentExpression

can anyone explain to me how myVar is going to get evaluated ? if it's supposed to be LeftHandSideExpression ?



from assignment expression in ecma262

No comments:

Post a Comment