Skip to content

Commit 5008057

Browse files
committed
merging all conflicts
2 parents 0ab0df2 + d78b01e commit 5008057

File tree

319 files changed

+5810
-2544
lines changed

Some content is hidden

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

319 files changed

+5810
-2544
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: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# An Introduction to JavaScript
22

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+
Let's see what's so special about JavaScript, what we can achieve with it, and what other technologies play well with it.
44

55
## What is JavaScript?
66

@@ -24,26 +24,26 @@ The browser has an embedded engine sometimes called a "JavaScript virtual machin
2424

2525
Different engines have different "codenames". For example:
2626

27-
- [V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)) -- in Chrome and Opera.
27+
- [V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)) -- in Chrome, Opera and Edge.
2828
- [SpiderMonkey](https://en.wikipedia.org/wiki/SpiderMonkey) -- in Firefox.
29-
- ...There are other codenames like "Chakra" for IE, "ChakraCore" for Microsoft Edge, "Nitro" and "SquirrelFish" for Safari, etc.
29+
- ...There are other codenames like "Chakra" for IE, "JavaScriptCore", "Nitro" and "SquirrelFish" for Safari, etc.
3030

31-
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 and Opera.
31+
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.
3232

3333
```smart header="How do engines work?"
3434
3535
Engines are complicated. But the basics are easy.
3636
3737
1. The engine (embedded if it's a browser) reads ("parses") the script.
38-
2. Then it converts ("compiles") the script to the machine language.
38+
2. Then it converts ("compiles") the script to machine code.
3939
3. And then the machine code runs, pretty fast.
4040
4141
The engine applies optimizations at each step of the process. It even watches the compiled script as it runs, analyzes the data that flows through it, and further optimizes the machine code based on that knowledge.
4242
```
4343

4444
## What can in-browser JavaScript do?
4545

46-
Modern JavaScript is a "safe" programming language. It does not provide low-level access to memory or CPU, because it was initially created for browsers which do not require it.
46+
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.
4747

4848
JavaScript's capabilities greatly depend on the environment it's running in. For instance, [Node.js](https://wikipedia.org/wiki/Node.js) supports functions that allow JavaScript to read/write arbitrary files, perform network requests, etc.
4949

@@ -59,25 +59,25 @@ For instance, in-browser JavaScript is able to:
5959

6060
## What CAN'T in-browser JavaScript do?
6161

62-
JavaScript's abilities in the browser are limited for the sake of the user's safety. The aim is to prevent an evil webpage from accessing private information or harming the user's data.
62+
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.
6363

6464
Examples of such restrictions include:
6565

6666
- 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.
6767

6868
Modern browsers allow it to work with files, but the access is limited and only provided if the user does certain actions, like "dropping" a file into a browser window or selecting it via an `<input>` tag.
6969

70-
There are ways to interact with 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).
71-
- 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 if they come from different sites (from a different domain, protocol or port).
70+
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).
71+
- 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).
7272

73-
This is called the "Same Origin Policy". To work around that, *both pages* must agree for data exchange and contain a special JavaScript code that handles it. We'll cover that in the tutorial.
73+
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.
7474

75-
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` and steal information from there.
75+
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.
7676
- 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.
7777

7878
![](limitations.svg)
7979

80-
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.
80+
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.
8181

8282
## What makes JavaScript unique?
8383

@@ -86,36 +86,37 @@ There are at least *three* great things about JavaScript:
8686
```compare
8787
+ Full integration with HTML/CSS.
8888
+ Simple things are done simply.
89-
+ Support by all major browsers and enabled by default.
89+
+ Supported by all major browsers and enabled by default.
9090
```
9191
JavaScript is the only browser technology that combines these three things.
9292

9393
That's what makes JavaScript unique. That's why it's the most widespread tool for creating browser interfaces.
9494

95-
That said, JavaScript also allows to create servers, mobile applications, etc.
95+
That said, JavaScript can be used to create servers, mobile applications, etc.
9696

9797
## Languages "over" JavaScript
9898

9999
The syntax of JavaScript does not suit everyone's needs. Different people want different features.
100100

101101
That's to be expected, because projects and requirements are different for everyone.
102102

103-
So recently a plethora of new languages appeared, which are *transpiled* (converted) to JavaScript before they run in the browser.
103+
So, recently a plethora of new languages appeared, which are *transpiled* (converted) to JavaScript before they run in the browser.
104104

105105
Modern tools make the transpilation very fast and transparent, actually allowing developers to code in another language and auto-converting it "under the hood".
106106

107107
Examples of such languages:
108108

109-
- [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.
110-
- [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.
111-
- [Flow](http://flow.org/) also adds data typing, but in a different way. Developed by Facebook.
109+
- [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.
110+
- [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.
111+
- [Flow](https://flow.org/) also adds data typing, but in a different way. Developed by Facebook.
112112
- [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.
113-
- [Brython](https://brython.info/) is a Python transpiler to JavaScript that allow to write application in pure Python without JavaScript.
113+
- [Brython](https://brython.info/) is a Python transpiler to JavaScript that enables the writing of applications in pure Python without JavaScript.
114+
- [Kotlin](https://kotlinlang.org/docs/reference/js-overview.html) is a modern, concise and safe programming language that can target the browser or Node.
114115

115-
There are more. Of course, even if we use one of transpiled languages, we should also know JavaScript to really understand what we're doing.
116+
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.
116117

117118
## Summary
118119

119-
- JavaScript was initially created as a browser-only language, but is now used in many other environments as well.
120-
- Today, JavaScript has a unique position as the most widely-adopted browser language with full integration with HTML/CSS.
120+
- JavaScript was initially created as a browser-only language, but it is now used in many other environments as well.
121+
- Today, JavaScript has a unique position as the most widely-adopted browser language, fully integrated with HTML/CSS.
121122
- 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.

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,35 @@
11

22
# Manuali dhe specifikat
33

4+
<<<<<<< HEAD
45
Ky libër eshte nje *udhëzues*. Ai synon t'ju ndihmojë të mësoni gradualisht gjuhën. Por sapo të njiheni me gjerat bazike, do t'ju nevojiten burime të tjera.
6+
=======
7+
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.
8+
>>>>>>> d78b01e9833009fab534462e05c03cffc51bf0e3
59
610
## Specification
711

812
[Specifikimi ECMA-262](https://www.ecma-international.org/publications/standards/Ecma-262.htm) përmban informacionin më të thellë, të detajuar dhe të zyrtarizuar rreth JavaScript. Ai percakton gjuhën.
913

1014
Por duke qenë se është formalizuar, është e vështirë për tu kuptuar në fillim. Prandaj, nëse ju nevojitet burimi më i besueshëm i informacionit për detajet e gjuhës, specifikacioni është vendi i duhur. Por nuk është për përdorim të përditshëm.
1115

16+
<<<<<<< HEAD
1217
Çdo vit lëshohet një version i ri i specifikacionit. Mes këtyre versioneve, drafti i fundit i specifikacionit gjendet në adresën <https://tc39.es/ecma262/>.
18+
=======
19+
A new specification version is released every year. Between these releases, the latest specification draft is at <https://tc39.es/ecma262/>.
20+
>>>>>>> d78b01e9833009fab534462e05c03cffc51bf0e3
1321
1422
Për të lexuar rreth veçorive të reja të fundit, duke përfshirë ato që janë "gati standarte" (të ashtuquajtura "stage 3"), shikoni propozimet tek <https://github.com/tc39/proposals>.
1523

24+
<<<<<<< HEAD
1625
Gjithashtu, nëse po zhvilloni për shfletuesin, atëherë ka specifikime të tjera që trajtohen në [pjesen e dyte](info:browser-environment) të udhëzuesit.
26+
=======
27+
Also, if you're developing for the browser, then there are other specifications covered in the [second part](info:browser-environment) of the tutorial.
28+
>>>>>>> d78b01e9833009fab534462e05c03cffc51bf0e3
1729
1830
## Manuali
1931

32+
<<<<<<< HEAD
2033
- **MDN (Mozilla) JavaScript Reference** është një manual me shembuj dhe informacione të tjera. Është shumë e mirë për të marrë informacion të hollësishëm për funksionet, metodat etj.
2134

2235
Mund ta gjeni në adresën <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference>.
@@ -27,16 +40,30 @@ Gjithashtu, nëse po zhvilloni për shfletuesin, atëherë ka specifikime të tj
2740
- **MSDN** – Manuali i Microsoft më shumë informacion, përfshirë JavaScript (shpesh e quajtur JScript). Nëse dikush ka nevojë për diçka specifike për Internet Explorer, është më mirë të shkojë aty: <http://msdn.microsoft.com/>.
2841

2942
Gjithashtu, mund të përdorim një kërkim në internet me fraza të tilla si "RegExp MSDN" ose "RegExp MSDN jscript".
43+
=======
44+
- **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.
45+
46+
You can find it at <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference>.
47+
48+
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.
49+
>>>>>>> d78b01e9833009fab534462e05c03cffc51bf0e3
3050
3151
## Tabelat e përputhshmërisë
3252

3353
Javascript është një gjuhë zhvilluese, veçoritë e reja shtohen rregullisht.
3454

3555
Për të parë mbështetjen e tyre në shfletuesit dhe motorët e tjerë, shihni:
3656

57+
<<<<<<< HEAD
3758
- <http://caniuse.com> - tabela e suportit sipas veçorive p.sh. për të parë cilët motorë mbështesin funksionet moderne të kriptografisë: <http://caniuse.com/#feat=cryptography>.
3859
- <https://kangax.github.io/compat-table> - Një tabelë me veçoritë e gjuhës dhe motorët që i suportojnë ose nuk i suportojnë.
3960

4061
Të gjithë këto burime janë të dobishme në zhvillimin e vërtetë, pasi përmbajnë informacion të vlefshëm rreth detajeve të gjuhës, mbështetjes së tyre, dhe aspekteve të tjera relevante.
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+
>>>>>>> d78b01e9833009fab534462e05c03cffc51bf0e3
4168
4269
Ju lutem mbani mend këto burime (ose këtë faqe) për rastet kur ju nevojitet informacion i hollësishëm rreth një veçorie të veçantë.

1-js/01-getting-started/3-code-editors/article.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,13 @@ Një IDE ngarkon projektin (që mund të përmbaj shume dosje), lejon navigimin
1212

1313
Nëse ende nuk keni zgjedhur një IDE, konsideroni këto opsione:
1414

15+
<<<<<<< HEAD
1516
- [Visual Studio Code](https://code.visualstudio.com/) (cross-platform, falas).
1617
- [WebStorm](http://www.jetbrains.com/webstorm/) (cross-platform, me pagese).
18+
=======
19+
- [Visual Studio Code](https://code.visualstudio.com/) (cross-platform, free).
20+
- [WebStorm](https://www.jetbrains.com/webstorm/) (cross-platform, paid).
21+
>>>>>>> d78b01e9833009fab534462e05c03cffc51bf0e3
1722
1823
Për Windows, gjithashtu ekziston "Visual Studio", pa u ngatërruar me "Visual Studio Code". "Visual Studio" është një editor me pagesë dhe shumë i fuqishëm, i përshtatshëm për platformën .NET. Është gjithashtu i mirë për JavaScript. Ekziston gjithashtu një version falas [Visual Studio Community](https://www.visualstudio.com/vs/community/).
1924

@@ -29,18 +34,35 @@ Diferenca kryesore mes një "editori të lehtë" dhe një "IDE" është se një
2934

3035
Në praktikë, editorët e lehtë mund të kenë shumë plugin duke përfshirë analizues sintakse në nivelin e direktorisë dhe plotësues automatikë, kështu që nuk ka kufi të prerë mes një editori të lehtë dhe një IDE.
3136

37+
<<<<<<< HEAD
3238
Opsionet në vijim meritojnë vëmendjen tuaj:
3339

3440
- [Atom](https://atom.io/) (cross-platform, falas).
3541
- [Visual Studio Code](https://code.visualstudio.com/) (cross-platform, falas).
3642
- [Sublime Text](http://www.sublimetext.com) (cross-platform, me pagese).
3743
- [Notepad++](https://notepad-plus-plus.org/) (Windows, falas).
3844
- [Vim](http://www.vim.org/) dhe [Emacs](https://www.gnu.org/software/emacs/) janë gjithashtu të shkëlqyeshëm nëse dini si t'i përdorni.
45+
=======
46+
There are many options, for instance:
47+
48+
- [Sublime Text](https://www.sublimetext.com/) (cross-platform, shareware).
49+
- [Notepad++](https://notepad-plus-plus.org/) (Windows, free).
50+
- [Vim](https://www.vim.org/) and [Emacs](https://www.gnu.org/software/emacs/) are also cool if you know how to use them.
51+
>>>>>>> d78b01e9833009fab534462e05c03cffc51bf0e3
3952
4053
## Le të mos diskutojmë.
4154

4255
Në listat e mësipërme janë të përfshirë editorët që unë ose miqtë e mi që i konsideroj zhvillues të mirë kemi përdorur për një kohë të gjatë dhe jemi të kënaqur me to.
4356

4457
Ka edhe editorë të tjerë të shkëlqyeshëm në botën tonë të madhe. Ju lutem zgjidhni atë që ju pëlqen më shumë.
4558

59+
<<<<<<< HEAD
4660
Zgjedhja e një editori, si çdo mjet tjetër, është individuale dhe varet nga projektet tuaja, zakonet dhe preferencat personale.
61+
=======
62+
The choice of an editor, like any other tool, is individual and depends on your projects, habits, and personal preferences.
63+
64+
The author's personal opinion:
65+
66+
- I'd use [Visual Studio Code](https://code.visualstudio.com/) if I develop mostly frontend.
67+
- Otherwise, if it's mostly another language/platform and partially frontend, then consider other editors, such as XCode (Mac), Visual Studio (Windows) or Jetbrains family (Webstorm, PHPStorm, RubyMine etc, depending on the language).
68+
>>>>>>> d78b01e9833009fab534462e05c03cffc51bf0e3

1-js/01-getting-started/4-devtools/article.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Mjetet e zhvilluesit do të hapen në skedën "Console" si parazgjedhje.
2222

2323
Do te duket dicka e tillë:
2424

25-
![chrome](chrome.png)
25+
![chrome](chrome.webp)
2626

2727
Pamja e saktë e mjetit te zhvilluesit varet nga versioni juaj i Chrome. Ajo ndryshon nga koha në kohë, por duhet të jetë e ngjashme.
2828

@@ -49,7 +49,11 @@ Pamjet e tyre janë shumë të ngjashme. Nëse dini si të përdorni njërin nga
4949

5050
Safari (shfletuesi i Mac, i cili nuk mbështetet në Windows/Linux) është paksa i veçantë këtu. Ne duhet të aktivizojmë "Menunë e Zhvilluesit" së pari.
5151

52+
<<<<<<< HEAD
5253
Hapni Preferencat dhe shkoni te paneli "Advanced". Në fund të tij ka një kutizë zgjedhjeje:
54+
=======
55+
Open Settings and go to the "Advanced" pane. There's a checkbox at the bottom:
56+
>>>>>>> d78b01e9833009fab534462e05c03cffc51bf0e3
5357
5458
![safari](safari.png)
5559

-41.1 KB
Binary file not shown.
22.2 KB
Loading
48.3 KB
Loading
-67.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)