Constructor, operator "new"#98
Constructor, operator "new"#98mahdyar merged 10 commits intojavascript-tutorial:masterfrom mahdiHash:master
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; // <-- بدون پرانتر |
| @@ -1,17 +1,17 @@ | |||
| # Constructor, operator "new" | |||
| # سازنده ، اپراتور "new" | |||
There was a problem hiding this comment.
The spacing for commas should be like this as you have already observed everywhere else:
سازنده، اپراتور
instead of:
سازنده ، اپراتور
| ``` | ||
|
|
||
| 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.
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.
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.
Also using عملگر instead of اپراتور would be better.
| // maybe complex logic and statements | ||
| // local variables etc | ||
| // ... کد های دیگر برای ساخت user | ||
| // شاید شامل منطق و دستورالعمل عجیبی باشد |
There was a problem hiding this comment.
"Complex" doesn't mean عجیب. Perhaps using پیچیده would be a better idea.
| ``` | ||
|
|
||
| Omitting parentheses here is not considered a "good style", but the syntax is permitted by specification. | ||
| اینجا پنهان کردن پرانتزها به عنوان یک "سبک خوب" فرض نمی شود، اما سینتکس طبق خصوصیات مجاز است. |
There was a problem hiding this comment.
"Omitting" doesn't mean پنهان کردن. Perhaps using حذف کردن would be a better idea.
There was a problem hiding this comment.
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 |
|
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.