There is no practical difference. They will both result in an anonymous function being assigned to a.
The first is a "simple assignment". In the second, the parentheses are acting as a "grouping operator", which does one thing:
The production PrimaryExpression : ( Expression ) is evaluated as follows:
- Return the result of evaluating Expression. This may be of type Reference.
So the grouping operator will return the function contained within it, and assign it to a, just like the first example.
There is no practical difference. They will both result in an anonymous function being assigned to a.
The first is a "simple assignment". In the second, the parentheses are acting as a "grouping operator", which does one thing:
The production PrimaryExpression : ( Expression ) is evaluated as follows:
- Return the result of evaluating Expression. This may be of type Reference.
So the grouping operator will return the function contained within it, and assign it to a, just like the first example.
There is no practical difference. They will both result in an anonymous function being assigned to a.
The first is a "simple assignment". In the second, the parentheses are acting as a "grouping operator", which does one thing:
The production PrimaryExpression : ( Expression ) is evaluated as follows:
- Return the result of evaluating Expression. This may be of type Reference.
So the grouping operator will return the function contained within it, and assign it to a, just like the first example.
There is no practical difference. They will both result in an anonymous function being assigned to a.
The first is a "simple assignment". In the second, the parentheses are acting as a "grouping operator", which does one thing:
The production PrimaryExpression : ( Expression ) is evaluated as follows:
- Return the result of evaluating Expression. This may be of type Reference.
So the grouping operator will return the function contained within it, and assign it to a, just like the first example.