Skip to content

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

Merged
merged 10 commits into from
Mar 20, 2021
Merged

Constructor, operator "new" #98

merged 10 commits into from
Mar 20, 2021

Conversation

mahdiHash
Copy link
Contributor

Please review and commit if anything is wrong.
All the files in "Constructor, operator new" are translated.

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.
@CLAassistant
Copy link

CLAassistant commented Mar 19, 2021

CLA assistant check
All committers have signed the CLA.


```js
let user = new User; // <-- no parentheses
// same as
let user = new User; // <-- بدون پرانتر
Copy link
Member

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"
Copy link
Member

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 ها است، و همچنین برای خواندن آسان است.
Copy link
Member

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="شیءها ، ما بر می گردیم!"
Copy link
Member

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"
Copy link
Member

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
// شاید شامل منطق و دستورالعمل عجیبی باشد
Copy link
Member

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.
اینجا پنهان کردن پرانتزها به عنوان یک "سبک خوب" فرض نمی شود، اما سینتکس طبق خصوصیات مجاز است.
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your review🙏🏻

@javascript-translate-bot

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

All the mentioned problems are solved.
Also I translated line 44.
@mahdiHash
Copy link
Contributor Author

/done

Copy link
Member

@mahdyar mahdyar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @mahdiHashemi14!

@mahdyar mahdyar merged commit 3e2c03d into javascript-tutorial:master Mar 20, 2021
@javascript-translate-bot

Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants