Merge pull request #2271 from vsemozhetbyt/patch-16

Correct solution explanation in 1.99.04 (Reference Type)
This commit is contained in:
Ilya Kantor 2020-11-10 12:12:17 +03:00 committed by GitHub
commit 2f4c29c69a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@ Here's the explanations.
2. The same, parentheses do not change the order of operations here, the dot is first anyway. 2. The same, parentheses do not change the order of operations here, the dot is first anyway.
3. Here we have a more complex call `(expression).method()`. The call works as if it were split into two lines: 3. Here we have a more complex call `(expression)()`. The call works as if it were split into two lines:
```js no-beautify ```js no-beautify
f = obj.go; // calculate the expression f = obj.go; // calculate the expression
@ -14,7 +14,7 @@ Here's the explanations.
Here `f()` is executed as a function, without `this`. Here `f()` is executed as a function, without `this`.
4. The similar thing as `(3)`, to the left of the dot `.` we have an expression. 4. The similar thing as `(3)`, to the left of the parentheses `()` we have an expression.
To explain the behavior of `(3)` and `(4)` we need to recall that property accessors (dot or square brackets) return a value of the Reference Type. To explain the behavior of `(3)` and `(4)` we need to recall that property accessors (dot or square brackets) return a value of the Reference Type.