-
Notifications
You must be signed in to change notification settings - Fork 99
Constructor, operator "new" #98
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
Translated task.md. Please review it and commit if anything is wrong
Please review and commit if anything is wrong.
Please review and commit if anything is wrong.
Please review and commit if anything is wrong
It's not done yet. Just the first part is translated
Translated the second part.
Translated the third part
Translation is done. Please review and commit if anything is wrong.
Removed an empty line.
|
||
```js | ||
let user = new User; // <-- no parentheses | ||
// same as | ||
let user = new 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.
typo:
پرانتز
@@ -1,17 +1,17 @@ | |||
# Constructor, operator "new" | |||
# سازنده ، اپراتور "new" |
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 spacing for commas should be like this as you have already observed everywhere else:
سازنده، اپراتور
instead of:
سازنده ، اپراتور
@@ -60,132 +60,132 @@ let user = { | |||
}; | |||
``` | |||
|
|||
Now if we want to create other users, we can call `new User("Ann")`, `new User("Alice")` and so on. Much shorter than using literals every time, and also easy to read. | |||
حالا اگر ما بخواهیم که user های دیگری بسازیم، می توانیم `new User("Ann")` ، `new User("Alice")` و ... را صدا بزنیم. این کار بسیار کوتاه تر از استفاده همیشگی از literal ها است، و همچنین برای خواندن آسان است. |
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 spacing for commas should be like this as you have already observed everywhere else:
سازنده، اپراتور
instead of:
سازنده ، اپراتور
|
||
```smart header="Objects, we'll be back!" | ||
In this chapter we only cover the basics about objects and constructors. They are essential for learning more about data types and functions in the next chapters. | ||
```smart header="شیءها ، ما بر می گردیم!" |
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 spacing for commas should be like this as you have already observed everywhere else:
سازنده، اپراتور
instead of:
سازنده ، اپراتور
@@ -1,17 +1,17 @@ | |||
# Constructor, operator "new" | |||
# سازنده ، اپراتور "new" |
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.
Also using عملگر
instead of اپراتور
would be better.
// maybe complex logic and statements | ||
// local variables etc | ||
// ... کد های دیگر برای ساخت 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.
"Complex" doesn't mean عجیب
. Perhaps using پیچیده
would be a better idea.
let user = new User(); | ||
``` | ||
|
||
Omitting parentheses here is not considered a "good style", but the syntax is permitted by specification. | ||
اینجا پنهان کردن پرانتزها به عنوان یک "سبک خوب" فرض نمی شود، اما سینتکس طبق خصوصیات مجاز است. |
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.
"Omitting" doesn't mean پنهان کردن
. Perhaps using حذف کردن
would be a better idea.
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.
Thanks for your review🙏🏻
Please make the requested changes. After it, add a comment "/done". |
All the mentioned problems are solved. Also I translated line 44.
/done |
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.
Thank you, @mahdiHashemi14!
Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉 |
Please review and commit if anything is wrong.
All the files in "Constructor, operator new" are translated.