Merge pull request #2417 from lumosmind/patch-55
all operators must return a value
This commit is contained in:
commit
12b23c74d9
1 changed files with 1 additions and 1 deletions
|
@ -219,7 +219,7 @@ alert( x ); // 5
|
||||||
|
|
||||||
The fact of `=` being an operator, not a "magical" language construct has an interesting implication.
|
The fact of `=` being an operator, not a "magical" language construct has an interesting implication.
|
||||||
|
|
||||||
Most operators in JavaScript return a value. That's obvious for `+` and `-`, but also true for `=`.
|
All operators in JavaScript return a value. That's obvious for `+` and `-`, but also true for `=`.
|
||||||
|
|
||||||
The call `x = value` writes the `value` into `x` *and then returns it*.
|
The call `x = value` writes the `value` into `x` *and then returns it*.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue