|
1 | | -# An Introduction to JavaScript |
| 1 | +# JavaScript-ga kirish |
2 | 2 |
|
3 | | -Let's see what's so special about JavaScript, what we can achieve with it, and which other technologies play well with it. |
| 3 | +Keling, JavaScript-da nima muhimligini, u bilan nimaga erisha olishimizni va qanday boshqa texnologiyalar bilan ushbu til yaxshi qo'llanilishini ko'rib chiqaylik. |
4 | 4 |
|
5 | | -## What is JavaScript? |
| 5 | +## JavaScript bu nima? |
6 | 6 |
|
7 | | -*JavaScript* was initially created to *"make web pages alive"*. |
| 7 | +*JavaScript* dastlab *"veb-sahifalarni jonlantirish"* uchun yaratilgan edi. |
8 | 8 |
|
9 | | -The programs in this language are called *scripts*. They can be written right in a web page's HTML and executed automatically as the page loads. |
| 9 | +Ushbu tilda dasturlar *skript* deb nomlanadi. Ular veb-sahifani HTML-da yozilishi mumkin va sahifa brauzer tomonidan yuklanganidan keyin ular avtomatik ravishda amalga oshiriladi. |
10 | 10 |
|
11 | | -Scripts are provided and executed as plain text. They don't need special preparation or compilation to run. |
| 11 | +Skriptlar oddiy matn sifatida taqdim etiladi va amalga oshiriladi. Ularni ishga tushirish uchun maxsus tayyorgarlik yoki kompilatsiya kerak emas. |
12 | 12 |
|
13 | | -In this aspect, JavaScript is very different from another language called [Java](https://en.wikipedia.org/wiki/Java_(programming_language)). |
| 13 | +Shu jihatdan, JavaScript [Java] (https://en.wikipedia.org/wiki/Java_(programming_language)) tilidan juda farq qiladi. |
14 | 14 |
|
15 | | -```smart header="Why <u>Java</u>Script?" |
16 | | -When JavaScript was created, it initially had another name: "LiveScript". But Java was very popular at that time, so it was decided that positioning a new language as a "younger brother" of Java would help. |
| 15 | +JavaScript yaratilganda, u dastlab "LiveScript" nomi bilan boshqa nomga ega bo'ldi. Ammo Java o'sha paytlarda juda mashhur edi, shuning uchun Java tilining "kichik birodari" sifatida yangi tilni joylashtirishga yordam berishga qaror qilindi. |
17 | 16 |
|
18 | | -But as it evolved, JavaScript became a fully independent language with its own specification called [ECMAScript](http://en.wikipedia.org/wiki/ECMAScript), and now it has no relation to Java at all. |
| 17 | +```smart header="Nega <u>Java</u>Script?" |
| 18 | +JavaScript yaratilganda, u dastlab "LiveScript" nomi bilan taqdim etilgan edi. Ammo Java o'sha paytlarda juda mashhur edi, shuning uchun Java tilining "ukasi" sifatida yangi tilni taqdim etish g'oyasi JS mashhur bo'lishga yordam beradi deb hisoblangan . |
| 19 | +
|
| 20 | +Ammo, rivojlanish jarayonida, JavaScript [ECMAScript] (http://en.wikipedia.org/wiki/ECMAScript) deb ataladigan o'z xususiyatiga ega to'liq mustaqil tilga aylangan va hozirda Java tiliga hech qanday aloqasi yo'q. |
19 | 21 | ``` |
20 | 22 |
|
21 | | -Today, JavaScript can execute not only in the browser, but also on the server, or actually on any device that has a special program called [the JavaScript engine](https://en.wikipedia.org/wiki/JavaScript_engine). |
| 23 | +Bugungi kunda JavaScript nafaqat brauzerda, balki serverda yoki aslida [JavaScript interpretatori](https://en.wikipedia.org/wiki/JavaScript_engine) deb nomlangan maxsus dasturga ega bo'lgan har qanday qurilmada ham bajarilishi mumkin. |
22 | 24 |
|
23 | 25 | The browser has an embedded engine sometimes called a "JavaScript virtual machine". |
24 | 26 |
|
@@ -79,42 +81,41 @@ Examples of such restrictions include: |
79 | 81 |
|
80 | 82 | Such limits do not exist if JavaScript is used outside of the browser, for example on a server. Modern browsers also allow plugin/extensions which may ask for extended permissions. |
81 | 83 |
|
82 | | -## What makes JavaScript unique? |
| 84 | +## JavaScript-ni qaysi xususiyatlari uni noyob qiladi? |
83 | 85 |
|
84 | | -There are at least *three* great things about JavaScript: |
| 86 | +JavaScript hech bo'lmaganda *uchta* ajoyib xususiyatga ega: |
85 | 87 |
|
86 | | -```compare |
87 | | -+ Full integration with HTML/CSS. |
88 | | -+ Simple things are done simply. |
89 | | -+ Support by all major browsers and enabled by default. |
| 88 | +```solishtiring |
| 89 | ++ HTML/CSS bilan to'liq integratsiyasi. |
| 90 | ++ Oson ishlar osongina amalga oshiriladi. |
| 91 | ++ Barcha asosiy brauzerlar tomonidan qo'llab-quvvatlanadi va ularda sukut bo'yicha yoqilgan. |
90 | 92 | ``` |
91 | | -JavaScript is the only browser technology that combines these three things. |
92 | | - |
93 | | -That's what makes JavaScript unique. That's why it's the most widespread tool for creating browser interfaces. |
| 93 | +JavaScript - bu uchta narsani birlashtirgan yagona brauzer texnologiyasidir. |
94 | 94 |
|
95 | | -While planning to learn a new technology, it's beneficial to check its perspectives. So let's move on to the modern trends affecting it, including new languages and browser abilities. |
| 95 | +Bu JavaScript-ni noyob qiladi. Shuning uchun u brauzer interfeyslarini yaratishda eng keng tarqalgan vositadir. |
96 | 96 |
|
| 97 | +Yangi texnologiyani o'rganishni rejalashtirayotib, uning istiqbollarini tekshirish ham muhimdir. Keling, zamonaviy tendentsiyalarga o'taylik. |
97 | 98 |
|
98 | | -## Languages "over" JavaScript |
| 99 | +## JavaScript "ustidan" qo'llanadigan tillar |
99 | 100 |
|
100 | | -The syntax of JavaScript does not suit everyone's needs. Different people want different features. |
| 101 | +JavaScript-ning sintaksisi hammaning ehtiyojlariga mos kelmaydi. Turli odamlar turli xususiyatlarni xohlashadi. |
101 | 102 |
|
102 | | -That's to be expected, because projects and requirements are different for everyone. |
| 103 | +Bu kutilgan hodisa bo'lishi kerak edi, chunki loyihalar va talablar har bir kishi uchun farq qiladi. |
103 | 104 |
|
104 | | -So recently a plethora of new languages appeared, which are *transpiled* (converted) to JavaScript before they run in the browser. |
| 105 | +Shunday qilib, yaqinda juda ko'p yangi tillar paydo bo'ldi va brauzer ularni ishlatishdan oldin JavaScript-ga aylantirib bajaradi. |
105 | 106 |
|
106 | | -Modern tools make the transpilation very fast and transparent, actually allowing developers to code in another language and auto-converting it "under the hood". |
| 107 | +Zamonaviy asboblar transpilatsiyani juda tez va shaffof bajaradi, aslida dasturchilar kodni bitta tilda yozganda, ular uni avtomatik tarzda boshqa tilga aylantirish imkonini beradi. |
107 | 108 |
|
108 | | -Examples of such languages: |
| 109 | +Bunday tillarning namunalari: |
109 | 110 |
|
110 | | -- [CoffeeScript](http://coffeescript.org/) is a "syntactic sugar" for JavaScript. It introduces shorter syntax, allowing us to write clearer and more precise code. Usually, Ruby devs like it. |
111 | | -- [TypeScript](http://www.typescriptlang.org/) is concentrated on adding "strict data typing" to simplify the development and support of complex systems. It is developed by Microsoft. |
112 | | -- [Dart](https://www.dartlang.org/) is a standalone language that has its own engine that runs in non-browser environments (like mobile apps). It was initially offered by Google as a replacement for JavaScript, but as of now, browsers require it to be transpiled to JavaScript just like the ones above. |
| 111 | +- [CoffeeScript] (http://coffeescript.org/) JavaScript uchun "sintaktik shakar" dir. Ushbu til bizga qisqa sintaksisni va aniqroq kodni taqdim etadi. Odatda, Ruby dasurchilari shu tilni afzal ko'rishadi. |
| 112 | +- [TypeScript] (http://www.typescriptlang.org/) murakkab tizimlarni ishlab chiqish, soddalashtirish va qo'llab-quvvatlash uchun "strict data typing"ni qo'shishga qaratilgan. Microsoft tomonidan ishlab chiqilgan. |
| 113 | +- [Dart] (https://www.dartlang.org/) brauzer bo'lmagan muhitda (mobil ilovalar kabi) ishlaydigan o'z dvigateliga ega bo'lgan mustaqil til. Bu dastlab JavaScript uchun zaxira sifatida Google tomonidan taklif etildi, lekin hozirgi paytda, brauzerlar shu tilni ham JS-ga transpilatsiya bo'lishini talab qilishadi. |
113 | 114 |
|
114 | | -There are more. Of course, even if we use one of these languages, we should also know JavaScript to really understand what we're doing. |
| 115 | +Bundan ham ko'proq tillar mavjud. Albatta, biz bu tillardan birini ishlatsak ham, biz nima qilayotganimizni tushunish uchun JavaScript-ni bilishimiz kerak. |
115 | 116 |
|
116 | | -## Summary |
| 117 | +## Xulosa |
117 | 118 |
|
118 | | -- JavaScript was initially created as a browser-only language, but is now used in many other environments as well. |
119 | | -- Today, JavaScript has a unique position as the most widely-adopted browser language with full integration with HTML/CSS. |
120 | | -- 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. |
| 119 | +- JavaScript dastlab brauzer tili sifatida yaratilgan, ammo hozirgi paytda ko'pgina boshqa muhitlarda ham qo'llanilmoqda. |
| 120 | +- Bugun JavaScript HTML/CSS bilan to'la integratsiyalashgan va eng keng tarqalgan brauzer tili hisoblanadi. |
| 121 | +- JavaScript-ga "aylanadigan" va muayyan xususiyatlarni taqdim etadigan ko'plab tillar mavjud. Javascriptni o'zlashtirgandan so'ng kamida qisqacha ularga bir nazar tashlash tavsiya etiladi. |
0 commit comments