Skip to content

Commit 3f9ad75

Browse files
committed
merging all conflicts
2 parents 9060908 + 540d753 commit 3f9ad75

File tree

455 files changed

+8939
-3757
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

455 files changed

+8939
-3757
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: iliakan

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ sftp-config.json
2121
Thumbs.db
2222

2323

24+
/svgs

1-js/01-getting-started/1-intro/article.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
# JavaScript-ə giriş
22

3+
<<<<<<< HEAD
34
Gəlin JavaScript-in niyə belə xüsusi olduğuna, onunla nələr edə biləcəyimizə və onun hansı texnologiyalarla qaynayıb qarışdığına bir nəzər yetirək.
5+
=======
6+
Let's see what's so special about JavaScript, what we can achieve with it, and what other technologies play well with it.
7+
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b
48
59
## JavaScript nədir?
610

11+
<<<<<<< HEAD
712
_JavaScript_ ilkin olaraq _"web səhifələri canlandırmaq"_ üçün yaradılmışdır.
13+
=======
14+
*JavaScript* was initially created to "make web pages alive".
15+
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b
816
917
Bu dilə yazılmış proqramlar _skriptlər_ adlandırılır. Bu skriptlər, birbaşa web səhifənin HTML-inin içərisində yazıla və səhifə yükləndikcə icra oluna bilər.
1018

@@ -26,28 +34,46 @@ Brauzerin daxilində "JavaScript virtual maşını" adlı bir mühərrik mövcud
2634

2735
Müxtəlif mühərriklərin müxtəlif kodadları var. Misalçün:
2836

37+
<<<<<<< HEAD
2938
- [V8](<https://en.wikipedia.org/wiki/V8_(JavaScript_engine)>) -- Chrome və Operada.
3039
- [SpiderMonkey](https://en.wikipedia.org/wiki/SpiderMonkey) -- in Firefoxda.
3140
- [Chakra](<https://en.wikipedia.org/wiki/Chakra_(JScript_engine)>) -- Microsoft Edgedə
3241
- [JavaScriptCore](https://en.wikipedia.org/wiki/WebKit#JavaScriptCore) -- Safaridə (WebKit) və s.
3342

3443
Yuxarıdakı terminləri yadda saxlamağınız tövsiyyə olunur çünki, bu cür terminlər developer məqalələrində çox istifadə olunur. Nümunə üçün onu deyə bilərik ki, kimsə sizə "filan xüsusiyyət V8-də dəstəklənir" deyəndə, o dəqiqə biləcəksiniz ki, Chrome və Opera (bir də gördünüz MS Edge) bu xüsusiyyəti dəstəkləyir.
44+
=======
45+
- [V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)) -- in Chrome, Opera and Edge.
46+
- [SpiderMonkey](https://en.wikipedia.org/wiki/SpiderMonkey) -- in Firefox.
47+
- ...There are other codenames like "Chakra" for IE, "JavaScriptCore", "Nitro" and "SquirrelFish" for Safari, etc.
48+
49+
The terms above are good to remember because they are used in developer articles on the internet. We'll use them too. For instance, if "a feature X is supported by V8", then it probably works in Chrome, Opera and Edge.
50+
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b
3551
3652
```smart header="Bəs bu mühərriklər necə işləyir?"
3753
3854
Düzünü desək, bu mühərriklər olduqca mürəkkəbdir lakin əsaslar sadədir:
3955
56+
<<<<<<< HEAD
4057
1. Əvvəlcə skript oxunulur, token-lərə ayrılır və parse edilir
4158
2. Yaradılmış token-lərdən [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) qurulur
4259
3. Həmin tree-dən [bytecode](https://en.wikipedia.org/wiki/Bytecode) generasiya olunur
4360
4. Bytecode isə maşın koduna çevrilərək icra olunur
61+
=======
62+
1. The engine (embedded if it's a browser) reads ("parses") the script.
63+
2. Then it converts ("compiles") the script to machine code.
64+
3. And then the machine code runs, pretty fast.
65+
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b
4466
4567
Təbii ki, mühərrikin işi bununla bitmir. Hər bir mərhələdə müəyyən optimallaşdırmalar aparılır və skriptlər icra olunduqca optimallaşdırma üçün məlumatlar toplanılır. Bunun vasitəsilə daha süərtli maşın kodları generasiya olunur.
4668
```
4769

4870
## JavaScript brauzer mühitində nələrə qadirdir?
4971

72+
<<<<<<< HEAD
5073
Müasir JavaScript olduqca təhlükəsiz proqramlaşdırma dilidir. O, ilkin olaraq sadəcə brauzer mühitində işləmək üçün yaradıldığı üçün yaddaşa və ya CPU-ya birbaşa müdaxilə imkanı vermir.
74+
=======
75+
Modern JavaScript is a "safe" programming language. It does not provide low-level access to memory or the CPU, because it was initially created for browsers which do not require it.
76+
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b
5177
5278
Lakin JavaScript-in imkanları onun icra olunduğu mühitdən asılı olaraq dəyişir. Misalçün, [Node.js](https://wikipedia.org/wiki/Node.js) ilə JavaScript faylları oxuya/yaza, şəbəkə sorğuları və s. edə bilər.
5379

@@ -63,14 +89,23 @@ Bunlara misal olaraq:
6389

6490
Və digər şeyləri göstərmək olar.
6591

92+
<<<<<<< HEAD
6693
## Bəs JavaScript brauzer daxilində nələri EDƏ BİLMİR?
94+
=======
95+
JavaScript's abilities in the browser are limited to protect the user's safety. The aim is to prevent an evil webpage from accessing private information or harming the user's data.
96+
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b
6797
6898
İstifadəçinin təhlükəsizliyini təmin etmək üçün, JavaScript-in brauzerdəki funksionallıqları limitlidir.
6999

100+
<<<<<<< HEAD
70101
Bu cür limitlərə aşağıdakılar daxildir:
102+
=======
103+
- JavaScript on a webpage may not read/write arbitrary files on the hard disk, copy them or execute programs. It has no direct access to OS functions.
104+
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b
71105
72106
- Hər hansı bir web səhifədəki JavaScript sizin sərt diskinizdəki ixtiyari faylları yarada, silə, dəyişə və ya icra edə bilməz. Onun sizin əməliyyat sisteminin funksiyalarına bir başa çıxışı yoxdur.
73107

108+
<<<<<<< HEAD
74109
Müasir brauzerlər fayllarla işləməyə imkan yaradır lakin bu əməliyyat `<input>` etiketi vasitəsilə sayta fayl yükləməkdən başqa bir şeyə imkan yaratmır.
75110

76111
Bununla bərarbər, brauzer sizə kamera və mikrofon kimi cihazlarlə işləmək imkanı yaradır lakin bu əməliyyatları istifadəçinin bir başa icazəsi olmadan etmək qeyri-mümkündür. Yəni evdə hər hansı bir işlə məşğul olanda kimsə sizi hansısa web səhifədən izləyə bilməz, bunun üçün siz brauzerə icazə verməlisiniz.
@@ -84,41 +119,85 @@ Bu cür limitlərə aşağıdakılar daxildir:
84119
![](limitations.svg)
85120

86121
Bu cür məhdudiyyətlər sadəcə brauzer daxilində mövcuddur, daha öncə də qeyd etdiyimiz kimi JavaScript-in imkanları mühitə görə dəyişir.
122+
=======
123+
There are ways to interact with the camera/microphone and other devices, but they require a user's explicit permission. So a JavaScript-enabled page may not sneakily enable a web-camera, observe the surroundings and send the information to the [NSA](https://en.wikipedia.org/wiki/National_Security_Agency).
124+
- Different tabs/windows generally do not know about each other. Sometimes they do, for example when one window uses JavaScript to open the other one. But even in this case, JavaScript from one page may not access the other page if they come from different sites (from a different domain, protocol or port).
125+
126+
This is called the "Same Origin Policy". To work around that, *both pages* must agree for data exchange and must contain special JavaScript code that handles it. We'll cover that in the tutorial.
127+
128+
This limitation is, again, for the user's safety. A page from `http://anysite.com` which a user has opened must not be able to access another browser tab with the URL `http://gmail.com`, for example, and steal information from there.
129+
- JavaScript can easily communicate over the net to the server where the current page came from. But its ability to receive data from other sites/domains is crippled. Though possible, it requires explicit agreement (expressed in HTTP headers) from the remote side. Once again, that's a safety limitation.
130+
131+
![](limitations.svg)
132+
133+
Such limitations do not exist if JavaScript is used outside of the browser, for example on a server. Modern browsers also allow plugins/extensions which may ask for extended permissions.
134+
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b
87135
88136
## JavaScript-i unikal edən nədir?
89137

90138
Aşağıdakılar, JavaScript-i unikal edən ən az üç şeydir:
91139

92140
```compare
141+
<<<<<<< HEAD
93142
+ HTML/CSS ilə tam inteqrasiya.
94143
+ Sadə şeylər sadəliklə icra olunur.
95144
+ Əksər brauzerlər tərəfindən dəstəklənir və defolt olaraq aktivdir.
145+
=======
146+
+ Full integration with HTML/CSS.
147+
+ Simple things are done simply.
148+
+ Supported by all major browsers and enabled by default.
149+
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b
96150
```
97151

98152
Bu üç xüsusiyyəti özündə birləşdirən yegənə texnologiya JavaScript-dir.
99153

154+
<<<<<<< HEAD
100155
Məhz bu səbəbdən, JavaScript unikaldır və ən çox yayılmış proqramlaşdırma dillərindəndir.
156+
=======
157+
That said, JavaScript can be used to create servers, mobile applications, etc.
158+
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b
101159
102160
Yeri gəlmişək, onu da qeyd etmək lazımdır ki, JavaScript ilə mobil tətbiqlər və serverlər də yarada bilərsiniz.
103161

104162
## JavaScript "üzərində" dillər
105163

106164
JavaScript-in sintaksisi hamının ehtiyaclarını ödəmir. Müxtəlif insanlar, müxtəlif funksionallıqlar tələb edir.
107165

166+
<<<<<<< HEAD
108167
Təbii ki, bu normaldır, çünki layihələr və tələblər hamı üçün fərqlidir.
168+
=======
169+
So, recently a plethora of new languages appeared, which are *transpiled* (converted) to JavaScript before they run in the browser.
170+
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b
109171
110172
Son zamanlarda, JavaScript-ə çevrilən (transpiled) bir çox dillər meydana gəlmişdir. Onlar, yalnız development mühitində fərqli funksionallıqlar irəli sürür lakin, daha sonra brauzerdə işləyə bilmək üçün JavaScript-ə çevrilməlidir.
111173

112174
Belə dillərə nümunə olaraq aşağıdakıları göstərmək olar:
113175

176+
<<<<<<< HEAD
114177
- [CoffeeScript](http://coffeescript.org/) JavaScript üçün "Sintaktik şəkərdir"(syntactic sugar) və daha qısa və anlaşıqlı sintaksis ortaya qoyur. Adətən Ruby developerlər onu sevir.
115178
- [TypeScript](http://www.typescriptlang.org/) JavaScript-ə strict type sistemi əlavə edir və development zamanı bəzi bugların qarşısını alır, çox vaxt performansda da qazandırır. TypeScript Microsoft tərəfindən yaradılmışdır və maintain edilir.
116179
- [Flow](http://flow.org/) həmçinin strict type sistemi əlavə edir lakin başqa yol ilə. Facebook tərəfindən yaradılmışdır.
117180

118181
Təbii ki, belə dillər daha çoxdur. Lakin bu dilləri başa düşmək üçün əvvəlcə JavaScript-i tam anlamaq şərtdir.
182+
=======
183+
- [CoffeeScript](https://coffeescript.org/) is "syntactic sugar" for JavaScript. It introduces shorter syntax, allowing us to write clearer and more precise code. Usually, Ruby devs like it.
184+
- [TypeScript](https://www.typescriptlang.org/) is concentrated on adding "strict data typing" to simplify the development and support of complex systems. It is developed by Microsoft.
185+
- [Flow](https://flow.org/) also adds data typing, but in a different way. Developed by Facebook.
186+
- [Dart](https://www.dartlang.org/) is a standalone language that has its own engine that runs in non-browser environments (like mobile apps), but also can be transpiled to JavaScript. Developed by Google.
187+
- [Brython](https://brython.info/) is a Python transpiler to JavaScript that enables the writing of applications in pure Python without JavaScript.
188+
- [Kotlin](https://kotlinlang.org/docs/reference/js-overview.html) is a modern, concise and safe programming language that can target the browser or Node.
189+
190+
There are more. Of course, even if we use one of these transpiled languages, we should also know JavaScript to really understand what we're doing.
191+
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b
119192
120193
## Xülasə
121194

195+
<<<<<<< HEAD
122196
- JavaScript ilkin olaraq yalnız brauzerlər üçün yaradılmış, lakin sonradan başqa mühitlərdə də istifadə olunmağa başlamışdır.
123197
- Günümüzdə JavaScript HTML və CSS ilə tam inteqrasiya oluna bilər, geniş yayılmış unikal bir proqramlaşdırma dilidir.
124198
- JavaScript-ə çevrilən və yeni funksionallıqlar təqdim edən bir çox dillər mövcuddur. Bu dillərdən bəzilərinə nəzər salmaq tövsiyyə olunur. Misalçün, JavaScript-i tam başa düşdükdən sonra TypeScript-dən başlaya bilərsiniz.
199+
=======
200+
- JavaScript was initially created as a browser-only language, but it is now used in many other environments as well.
201+
- Today, JavaScript has a unique position as the most widely-adopted browser language, fully integrated with HTML/CSS.
202+
- There are many languages that get "transpiled" to JavaScript and provide certain features. It is recommended to take a look at them, at least briefly, after mastering JavaScript.
203+
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,35 @@
22

33
Bu kitab sizin dil ilə tanışlığınıza və onu tədricən öyrənməyinizə yönəlmiş bir dərslikdir. Lakin dilin əsasları ilə tam tanış olduqdan sonra artıq başqa mənbələrə də ehtiyac duyacaqsınız. Gəlin bu cür mənbələrlə tanış olaq.
44

5+
<<<<<<< HEAD
56
## Spesifikasiyalar
7+
=======
8+
This book is a *tutorial*. It aims to help you gradually learn the language. But once you're familiar with the basics, you'll need other resources.
9+
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b
610
711
[ECMA-262 standartları](https://www.ecma-international.org/publications/standards/Ecma-262.htm) JavaScript haqqında ən dərin, detallı və formal məlumatları ehtiva edir. Başqa sözlə desək, dili təyin edir.
812

913
Lakin bu spesifikasiyalar çox formal olduğu üçün bəzən anlaşılması çətin ola bilər. Spesifikasiyalar, JavaScript haqqında tapa biləcəyiniz ən güvənli və dəqiq məlumat mənbəyidir, hərçənd günlük istifadə üçün deyil.
1014

1115
Spesifikasiyanın hər il yeri versiyası yayımlanır. Ən son versiyası ilə [burada](https://tc39.es/ecma262/) tanış ola bilərsiniz.
1216

17+
<<<<<<< HEAD
1318
ECMA-262 standartlarına il boyunca yeni təkliflər verilir, bu təkliflər bir neçə mərhələdən keçdikdən sonra dilə əlavə olunur (standartlaşdırlır). Ən son təkliflər və "demək olar ki standartlaşdırılmış" (stage 3 proposals) xüsusiyyətlər ilə [burada](https://github.com/tc39/proposals) tanış ola bilərsiniz.
19+
=======
20+
A new specification version is released every year. Between these releases, the latest specification draft is at <https://tc39.es/ecma262/>.
21+
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b
1422
1523
Bununla bərabar, əgər JavaScripti brauzer daxilində istifadə edirsinizsə bunun üçün başqa standartlar mövcuddur. Bu barədə dərsliyin [ikinci hissəsində](info:browser-environment) danışacağıq.
1624

25+
<<<<<<< HEAD
1726
## Manuallar
27+
=======
28+
Also, if you're developing for the browser, then there are other specifications covered in the [second part](info:browser-environment) of the tutorial.
29+
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b
1830
1931
- **MDN (Mozilla) JavaScript Reference**, nümunələr və digər məlumatlarla tanış ola biləcəyiniz başqa bir mənbədir. MDN, spesifik funksiya, obyektlər, metodlar və s. haqqında dərin məlumat əldə etmək və nümunələrlə tanış olmaq üçün əla yerdir.
2032

33+
<<<<<<< HEAD
2134
Elə indi bu keçiddən istifadə edib baxmağınız tövsiyyə olunur: <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference>.
2235

2336
Keçidə daxil olduqdan sonra sizin üçün axtardığınız şeyi tapmaq bir az çətin ola bilər. Bu səbəbdən, çox vaxt Google-da axtarış etmək daha əlverişli olar bilər. Misalçün, deyək ki, `parseInt` funksiyası haqqında ətraflı məlumat almaq istəyirsiniz, bunun üçün <https://google.com/search?q=MDN+parseInt> kimi axtarış edə bilərsiniz.
@@ -29,6 +42,13 @@ Bununla bərabar, əgər JavaScripti brauzer daxilində istifadə edirsinizsə b
2942
## Brauzer dəstəyi və uyğunluq cədvəlləri
3043

3144
JavaScript iknişafda olan bir dil olduğu üçün müntəzəm olaraq yeni xüsusiyyətlər əlavə olunur.
45+
=======
46+
- **MDN (Mozilla) JavaScript Reference** is the main manual with examples and other information. It's great to get in-depth information about individual language functions, methods etc.
47+
48+
You can find it at <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference>.
49+
50+
Although, it's often best to use an internet search instead. Just use "MDN [term]" in the query, e.g. <https://google.com/search?q=MDN+parseInt> to search for the `parseInt` function.
51+
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b
3252
3353
Bu cür xüsusiyyətlərin müxtəlif brauzerlər və engine-lər tərəfindən nə dərəcədə dəstəkləndiyini öyrənmək üçün aşağıdakı resurslardan istifadə edin:
3454

@@ -37,4 +57,13 @@ Bu cür xüsusiyyətlərin müxtəlif brauzerlər və engine-lər tərəfindən
3757

3858
Bütün bu resurslar, dil haqqında müəyyən detallar onların nə dərəcədə dəstəklənib dəstəklənmədiyi və s. kimi dəyərli məlumatlarla zəngin olduğu üçün real iş mühitində çox işinizə yaraya bilər.
3959

60+
<<<<<<< HEAD
4061
Onları yadda saxlamağınız və detallı məlumat üçün onlara istinad etməyiniz vacibdir.
62+
=======
63+
- <https://caniuse.com> - per-feature tables of support, e.g. to see which engines support modern cryptography functions: <https://caniuse.com/#feat=cryptography>.
64+
- <https://kangax.github.io/compat-table> - a table with language features and engines that support those or don't support.
65+
66+
All these resources are useful in real-life development, as they contain valuable information about language details, their support, etc.
67+
68+
Please remember them (or this page) for the cases when you need in-depth information about a particular feature.
69+
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b

0 commit comments

Comments
 (0)