Objects#118
Merged
mahdyar merged 25 commits intojavascript-tutorial:masterfrom May 4, 2021
mahdiHash:master
Merged
Conversation
Please review and commit / comment if anything is wrong I had trouble with translating end of the line 500, so it would be the best if you check it yourself too! And read the translation of comments as you "see" them. Just ignore the text direction for comments or otherwise, it wouldn't look correct that way 😬
mahdyar
requested changes
May 4, 2021
| - ...و غیره. | ||
|
|
||
| They have their special features that we'll study later. Sometimes people say something like "Array type" or "Date type", but formally they are not types of their own, but belong to a single "object" data type. And they extend it in various ways. | ||
| هر کدام از آنها خصوصیات خاص خود را دارند که بعدا آنها را میآموزیم. بعضی اوقات افراد چیزهایی مانند "نوع Array" یا "نوع Date" را به زبان میآورند، اما به طور رسمی آنها نوعی از خود نیستند، و به نوع "object" تعلق دارند. و آنها این را با راههای مختلف گسترش میدهند. |
Member
There was a problem hiding this comment.
but formally they are not types of their own, but belong to a single "object" data type. And they extend it in various ways.
would be translated to:
اما به صورت رسمی، آنها یک نوع خاص نیستند، بلکه به یک نوع «object» تعلق دارند و آن را به روشهای مختلف گسترش میدهند.
| ``` | ||
|
|
||
| The dot notation cannot be used in a similar way: | ||
| نقطه نمیتواند به این شکل استفاده شود: |
| همچنین ما میتوانستیم به جای `key` از اسمی دیگر برای متغیر استفاده کنیم. برای مثال، `"for (let prop in obj)"` هم خیلی استفاده میشود. | ||
|
|
||
| ### Ordered like an object | ||
| ### مرتب مثل یک شیء |
| # سلام شیء | ||
|
|
||
| Write the code, one line for each action: | ||
| کد لازم را بنویسید، برای هر عمل، یک خط: |
Member
There was a problem hiding this comment.
کد را بنویسید، هر خط کد برای یک عمل:*
| همانطور که از فصل <info:types> میدانیم، 8 نوع داده در جاوااسکریپت وجود دارد. 7 مورد "اولیه یا اصلی" نامیده میشوند، به این دلیل که مقدارهای آنها فقط دارای یک چیز است (رشته یا عدد یا هر چیزی). | ||
|
|
||
| In contrast, objects are used to store keyed collections of various data and more complex entities. In JavaScript, objects penetrate almost every aspect of the language. So we must understand them first before going in-depth anywhere else. | ||
| در مقابل، شیءها (object) برای ذخیرهسازی مجموعهای از دادههای گوناگون و چیزهای پیچیدهتر استفاده میشوند. در جاوااسکریپت، شیءها تقریبا به تمام جنبههای زبان نفوذ کردهاند. پس ما باید قبل از اینکه عمیقا به موضوع دیگری وارد شویم شیءها را بشناسیم. |
|  | ||
|
|
||
| An empty object ("empty cabinet") can be created using one of two syntaxes: | ||
| یک شیء خالی یا empty ("قفسه خالی") میتواند با استفاده از دو سینتکس ساخته شود: |
Member
There was a problem hiding this comment.
There is no need for the English equivalent here: empty
Comment on lines
17
to
18
| let user = new Object(); // "سینتکس "سازنده شیء | ||
| let user = {}; // "سینتکس "شیء لیترال |
Member
There was a problem hiding this comment.
Don't translate these two phrases and let them be as they are:
object constructor
object literal
|
Please make the requested changes. After it, add a comment "/done". |
Contributor
Author
|
Thank you for your review @mahdyar |
|
Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please review and commit / comment if anything is wrong
I had trouble with translating end of the line 500, so it would be the best if you check it yourself too!
And read the translation of comments as you "see" them. Just ignore the text direction for comments or otherwise, it wouldn't look correct that way 😬