GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — BigInt by amirhshahbazi · Pull Request #120 · javascript-tutorial/fa.javascript.info Conversation
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
mahdyar
requested changes
|
|
Please make the requested changes. After it, add a comment "/done". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for the review, @mahdyar |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ``` | ||
|
|
||
| ## Math operators | ||
| ## عملیات ریاضی |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Math operators means عملگرهای ریاضی, not عملیات ریاضی.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ``` | ||
|
|
||
| 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.
The reason will be displayed to describe this comment to others. Learn more.
Put 5/2 between backticks as it was.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| ```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.
The reason will be displayed to describe this comment to others. Learn more.
There is no need to translate Error here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ``` | ||
|
|
||
| We should explicitly convert them if needed: using either `BigInt()` or `Number()`, like this: | ||
| می بایست آن ها ابتدا به صورت زیر، توسط `BigInt()` یا `Number()` تبدیل کرد: |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
You missed if needed.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ```` | ||
|
|
||
| ## Comparisons | ||
| ## عملگرهای مقایسه |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
مقایسهای would be a better translation.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| alert( +bigint ); // خطا | ||
| ``` | ||
| So we should use `Number()` to convert a bigint to a number. | ||
| باید ابتدا از `Number()` برای تبدیل یک bigint به نوع عددی استفاده کرد. |
There was a problem 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.
پس باید از...
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| alert( 1n || 2 ); // 1 (1n برابر با true است) | ||
|
|
||
| alert( 0n || 2 ); // 2 (0n is considered falsy) | ||
| alert( 0n || 2 ); // 2 (0n برابر با false است) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Considering means در نظر گرفتن.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Please make the requested changes. After it, add a comment "/done". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks, |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @amirhshahbazi!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.