Skip to content

Commit d96b657

Browse files
authored
Merge pull request #134 from javascript-tutorial/sync-82ed8f11
Sync with upstream @ 82ed8f1
2 parents 6bd7e0d + 5cb151a commit d96b657

File tree

6 files changed

+23
-13
lines changed

6 files changed

+23
-13
lines changed

1-js/01-getting-started/2-manuals-specifications/article.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
Բայց լեզվի նման ձևակերպումը դժվար է հասկանալ սկզբում: Եթե Ձեզ պետք է լեզվի մանրամասների մասին տեղեկատվության ամենավստահելի աղբյուրը, ապա այս պաշտոնական փաստաթուղթն է հենց այդ աղբյուրը: Սակայն այն նախատեսված չէ ամենօրյա օգտագործման համար:
1111

12-
Ամեն տարի թողարկվում է բնութագրի նոր տարբերակ: Ամենաթարմ սևագիրը գտնվում է <https://tc39.es/ecma262/> հասցեում:
12+
Ամեն տարի թողարկվում է հատկորոշման նոր տարբերակ: Այս թողարկումների միջև ամենաթարմ սևագիրը գտնվում է <https://tc39.es/ecma262/> հասցեում:
1313

1414
Լեզվի նորագույն հնարավորությունների մասին կարդալու համար (ներառյալ «գրեթե ստանդարտ»՝ այսպես կոչված «stage 3» հնարավորությունները) այցելեք առաջարկությունների կայքը՝ <https://github.com/tc39/proposals> հասցեով:
1515

@@ -21,17 +21,17 @@
2121

2222
Այն կարելի է գտնել <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference> հասցեով:
2323

24-
Հաճախ ավելի լավ է կատարել որոնում համացանցում: Ուղղակի օգտագործեք "MDN [տերմին]"-ը որոնման մեջ, օրինակ՝ <https://google.com/search?q=MDN+parseInt> `parseInt` որոնելու համար.
24+
Հաճախ ավելի լավ է կատարել որոնում համացանցում: Ուղղակի օգտագործեք "MDN [տերմին]"-ը որոնման մեջ, օրինակ՝ <https://google.com/search?q=MDN+parseInt>, `parseInt` ֆունկցիան որոնելու համար.
2525

2626
## Համատեղելիության աղյուսակներ
2727

2828
JavaScript-ը զարգացող լեզու է, և պարբերաբար նոր հնարավորություններ են ավելացվում:
2929

3030
Օգտվեք հետևյալ կայքերից՝ տարբեր վեբ զննիչներում և շարժիչներում դրանց հասանելիությունը ստուգելու համար.
3131

32-
- <https://caniuse.com> - հասանելիություն ըստ հնարավորթյունների, օրինակ՝ ցույց է տալիս այն շարժիչները, որոնցում հասանելի են գաղտնագրման ժամանակակից ֆուկցիաները: <http://caniuse.com/#feat=cryptography>:
33-
- <https://kangax.github.io/compat-table> - աղյուսակ է, կազմված լեզվի հնարավորություններից և շարժիչներից, որոնցում այդ հնարավորությունները հասանելի են, կամ հասանելի չեն:
32+
- <https://caniuse.com> - աջակցության աղյուսակներ՝ յուրաքանչյուր հատկանիշի համար, օրինակ՝ ցույց է տալիս այն շարժիչները, որոնցում սպասարկվում են գաղտնագրման ժամանակակից ֆուկցիաները: <http://caniuse.com/#feat=cryptography>:
33+
- <https://kangax.github.io/compat-table> - աղյուսակ է, կազմված լեզվի հնարավորություններից և շարժիչներից, որոնցում այդ հնարավորությունները սպասարկվում են կամ չեն սպասարկվում:
3434

35-
Բոլոր այս կայքերն օգտակար են առօրյա աշխատանքում, քանի որ տրամադրում են արժեքավոր տեղեկություններ լեզվի հնարավորությունների և դրանց հասանելիության մասին:
35+
Բոլոր այս կայքերն օգտակար են առօրյա աշխատանքում, քանի որ պարունակում են արժեքավոր տեղեկություններ լեզվի հատկանիշների, դրանց սպասարկման մասին և այլն․․․
3636

3737
Խնդրում ենք մտապահել այդ կայքերը (կամ այս էջը) այն դեպքերի համար, երբ անհրաժեշտ կլինի մանրամասն տեղեկություններ ստանալ որևէ հնարավորության մասին:

1-js/02-first-steps/05-types/article.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,20 @@ n = 12.345;
6868

6969
## BigInt [#bigint-type]
7070

71-
JavaScript-ում թվային (number) տիպը չի կարող ներկայացնել թվային արժեքներ, որոնք մեծ են <code>(2<sup>53</sup>-1)</code>-ից (նույնն է, ինչ `9007199254740991`), կամ փոքր են <code>-(2<sup>53</sup>-1)</code>-ից՝ բացասական թվերի դեպքում։ Այս տեխիկական սահմանափակումը պայմանավորված է թվերի ներքին ներկայացման յուրահատկություններով։
71+
JavaScript-ում «number» տիպը չի կարող ներկայացնել թվային արժեքներ, որոնք մեծ են <code>(2<sup>53</sup>-1)</code>-ից (նույնն է, ինչ `9007199254740991`), կամ փոքր են <code>-(2<sup>53</sup>-1)</code>-ից՝ բացասական թվերի դեպքում։
7272

73-
Հիմնական դեպքերում սա ավելի քան բավական է, բայց երբեմն մենք կարիք ենք ունենում օգտագործելու իսկապես մեծ թվեր, օրինակ՝ գաղտնագրման կամ ժամանականիշի (timestamp) միկրովարկյաններով ներկայացման դեպքում։
73+
Իսկապես ճշգրիտ լինելու համար, «number» տիպը կարող է պահել ավելի մեծ ամբողջ թվեր (մինչև <code>1.7976931348623157 * 10<sup>308</sup></code>), բայց անվտանգ ամբողջ թվերի միջակայքից դուրս <code>±(2): <sup>53</sup>-1)</code> ճշգրտության սխալ կլինի, քանի որ ոչ բոլոր թվանշաններն են տեղավորվում ֆիքսված 64-բիթանոց պահեստում: Այնպես որ, «մոտավոր» արժեք կարող է պահվել:
74+
75+
Օրինակ, այս երկու թվերը (անվտանգ տիրույթից անմիջապես վերև) նույնն են.
76+
77+
```js
78+
console.log(9007199254740991 + 1); // 9007199254740992
79+
console.log(9007199254740991 + 2); // 9007199254740992
80+
```
81+
82+
Այսպես ասած՝ <code>(2<sup>53</sup>-1)</code>-ից մեծ բոլոր կենտ ամբողջ թվերն ընդհանրապես չեն կարող պահվել «number» տիպում։
83+
84+
Շատ նպատակների համար <code>±(2<sup>53</sup>-1)</code> միջակայքը բավական է, բայց երբեմն մեզ անհրաժեշտ է իսկապես մեծ ամբողջ թվերի ամբողջ միջակայքը, օրինակ. գաղտնագրության կամ միկրովայրկյանային ճշգրտությամբ ժամանակի համար:
7485

7586
`BigInt`-ը վերջերս է ավելացվել լեզվում՝ կամայական մեծության թվեր նեկայացնելու նպատակով։
7687

1-js/05-data-types/02-number/article.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
In modern JavaScript, there are two types of numbers:
44

5-
1. Regular numbers in JavaScript are stored in 64-bit format [IEEE-754](https://en.wikipedia.org/wiki/IEEE_754-2008_revision), also known as "double precision floating point numbers". These are numbers that we're using most of the time, and we'll talk about them in this chapter.
5+
1. Regular numbers in JavaScript are stored in 64-bit format [IEEE-754](https://en.wikipedia.org/wiki/IEEE_754), also known as "double precision floating point numbers". These are numbers that we're using most of the time, and we'll talk about them in this chapter.
66

7-
2. BigInt numbers represent integers of arbitrary length. They are sometimes needed because a regular number can't safely exceed <code>2<sup>53</sup></code> or be less than <code>-2<sup>53</sup></code>. As bigints are used in few special areas, we devote them a special chapter <info:bigint>.
7+
2. BigInt numbers represent integers of arbitrary length. They are sometimes needed because a regular integer number can't safely exceed <code>(2<sup>53</sup>-1)</code> or be less than <code>-(2<sup>53</sup>-1)</code>, as we mentioned earlier in the chapter <info:types>. As bigints are used in few special areas, we devote them a special chapter <info:bigint>.
88

99
So here we'll talk about regular numbers. Let's expand our knowledge of them.
1010

@@ -192,7 +192,7 @@ There are two ways to do so:
192192

193193
## Imprecise calculations
194194

195-
Internally, a number is represented in 64-bit format [IEEE-754](https://en.wikipedia.org/wiki/IEEE_754-2008_revision), so there are exactly 64 bits to store a number: 52 of them are used to store the digits, 11 of them store the position of the decimal point (they are zero for integer numbers), and 1 bit is for the sign.
195+
Internally, a number is represented in 64-bit format [IEEE-754](https://en.wikipedia.org/wiki/IEEE_754), so there are exactly 64 bits to store a number: 52 of them are used to store the digits, 11 of them store the position of the decimal point, and 1 bit is for the sign.
196196

197197
If a number is really huge, it may overflow the 64-bit storage and become a special numeric value `Infinity`:
198198

1-js/06-advanced-functions/05-global-object/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var gVar = 5;
2525
alert(window.gVar); // 5 (became a property of the global object)
2626
```
2727

28-
The same effect have function declarations (statements with `function` keyword in the main code flow, not function expressions).
28+
Function declarations have the same effect (statements with `function` keyword in the main code flow, not function expressions).
2929

3030
Please don't rely on that! This behavior exists for compatibility reasons. Modern scripts use [JavaScript modules](info:modules) where such a thing doesn't happen.
3131

1-js/08-prototypes/03-native-prototypes/proto-constructor-animal-rabbit.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

8-web-components/5-slots-composition/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ The shadow DOM template with proper slots:
269269
```
270270

271271
1. `<span slot="title">` goes into `<slot name="title">`.
272-
2. There are many `<li slot="item">` in the template, but only one `<slot name="item">` in the template. So all such `<li slot="item">` are appended to `<slot name="item">` one after another, thus forming the list.
272+
2. There are many `<li slot="item">` in the `<custom-menu>`, but only one `<slot name="item">` in the template. So all such `<li slot="item">` are appended to `<slot name="item">` one after another, thus forming the list.
273273

274274
The flattened DOM becomes:
275275

0 commit comments

Comments
 (0)