-
Notifications
You must be signed in to change notification settings - Fork 30
Object methods, "this" #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
The error message in most browsers does not give us much of a clue about what went wrong. | ||
**Błąd wystąpił ponieważ nie ma średnika po`user = {...}`.** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing space between "po" and "`user..."
|
||
```js no-beautify | ||
let user = { go:... }(user.go)() | ||
``` | ||
|
||
Then we can also see that such a joint expression is syntactically a call of the object `{ go: ... }` as a function with the argument `(user.go)`. And that also happens on the same line with `let user`, so the `user` object has not yet even been defined, hence the error. | ||
Teraz widzimy, że taka składnia jest w zasadzie wywołaniem funkcji `{ go: ... }` z argumentem `(user.go)`. W dodatku wywołanie to znajduje się w tej samej linijce co `let user`, więc do obiekt `user` nie został jeszcze nawet zdefiniowany, dlatego pojawia się błąd. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sense of the first sentence has changed a bit. It should be something like: "Teraz widzimy, że taka składnia jest w zasadzie wywołaniem objektu { go: ... }
jako funkcji z argumentem...".
Also, please remove redunand "do" word from that part of the second sentence: "więc do obiekt user
nie został jeszcze..."
@@ -2,9 +2,9 @@ importance: 2 | |||
|
|||
--- | |||
|
|||
# Syntax check | |||
# Sprawdzian ze składni |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be more like: "Sprawdzenie składni"
|
||
2. The same, brackets do not change the order of operations here, the dot is first anyway. | ||
2. Tak jak powyżej. Nawiasy nie zmieniają tutaj kolejności wykonywania działań. Kropka ma pierwszeństwo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try to avoid splitting one original sentence into some smaller ones while translating.
So please change that to: "Tak jak powyżej, nawiasy nie zmieniają tutaj kolejności wykonywania działań, kropka i tak ma pierwszeństwo."
@@ -2,11 +2,11 @@ importance: 3 | |||
|
|||
--- | |||
|
|||
# Explain the value of "this" | |||
# Określ wartość "this": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove redunand ":" sign at the end of line.
|
||
So `ref: this` actually takes current `this` of the function. | ||
Zatem `ref:this` jest równoznaczne z `this` funkcji. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change "ref:this" into "ref: this" just for clarity.
@@ -2,11 +2,11 @@ importance: 5 | |||
|
|||
--- | |||
|
|||
# Using "this" in object literal | |||
# "this" w literałach obiektowych |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Używanie this
w obiektach" sounds better to me.
|
||
What is the result of accessing its `ref`? Why? | ||
Jaki będzie rezultat dostępu do jego `ref` ? I dlaczego? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove space between ref
and question mark
|
||
For instance, the code inside `user.sayHi()` may need the name of the `user`. | ||
DLa przykładu, kod wewnątrz `user.sayHi()` może wymagać imienia użytkownika `user`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
word "DLa" should have only first letter capital
|
||
```js | ||
```js run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove run
Please make the requested changes. After it, add a comment "/done". |
/done |
Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉 |
No description provided.