-
Notifications
You must be signed in to change notification settings - Fork 98
BigInt #120
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
BigInt #120
Conversation
Error: the article already has PR number in the Progress Issue #1, it's 117 |
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.
You don't need to make a new pull request for any changes you make. you can add more commits by pushing to the BigInt
branch on your fork.
In addition to that, please read the Translation Tips
:
Please keep line breaks and paragraphs "as is": don't add new lines and don't remove existing ones. Makes it easy to merge future changes from the English version into the translation.
You've removed the newline on line 8, please add it back.
Please make the requested changes. After it, add a comment "/done". |
Thanks for the review, @mahdyar |
1-js/99-js-misc/05-bigint/article.md
Outdated
``` | ||
|
||
## Math operators | ||
## عملیات ریاضی |
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.
Math operators
means عملگرهای ریاضی
, not عملیات ریاضی
.
1-js/99-js-misc/05-bigint/article.md
Outdated
|
||
```js run | ||
alert(1n + 2n); // 3 | ||
|
||
alert(5n / 2n); // 2 | ||
``` | ||
|
||
Please note: the division `5/2` returns the result rounded towards zero, without the decimal part. All operations on bigints return bigints. | ||
در نظر داشته باشید: عملیات تقسیم 5/2 نتیجه را بدون قسمت اعشار و رند شده به سمت صفر، باز می گرداند. همه ی عملیات بر روی bigint ها، مقداری را از نوع bigint باز می گردانند. |
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.
Put 5/2
between backticks as it was.
1-js/99-js-misc/05-bigint/article.md
Outdated
|
||
```js run | ||
alert(1n + 2); // Error: Cannot mix BigInt and other types | ||
alert(1n + 2); // خطا: Cannot mix BigInt and other types |
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.
There is no need to translate Error
here.
1-js/99-js-misc/05-bigint/article.md
Outdated
``` | ||
|
||
We should explicitly convert them if needed: using either `BigInt()` or `Number()`, like this: | ||
می بایست آن ها ابتدا به صورت زیر، توسط `BigInt()` یا `Number()` تبدیل کرد: |
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.
You missed if needed
.
1-js/99-js-misc/05-bigint/article.md
Outdated
```` | ||
|
||
## Comparisons | ||
## عملگرهای مقایسه |
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.
مقایسهای
would be a better translation.
1-js/99-js-misc/05-bigint/article.md
Outdated
``` | ||
So we should use `Number()` to convert a bigint to a number. | ||
باید ابتدا از `Number()` برای تبدیل یک bigint به نوع عددی استفاده کرد. |
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.
There is no ابتدا
in the text, don't add your own words. Also, you missed so
.
پس باید از...
1-js/99-js-misc/05-bigint/article.md
Outdated
|
||
alert( 0n || 2 ); // 2 (0n is considered falsy) | ||
alert( 0n || 2 ); // 2 (0n برابر با false است) |
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.
Considering
means در نظر گرفتن
.
Please make the requested changes. After it, add a comment "/done". |
Thanks, |
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, @amirhshahbazi!
Translated the BigInt page.