Skip to content

Commit 7cdc44b

Browse files
committed
merging all conflicts
2 parents 6bbc0ef + d78b01e commit 7cdc44b

File tree

229 files changed

+3730
-1251
lines changed

Some content is hidden

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

229 files changed

+3730
-1251
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

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ The terms above are good to remember because they are used in developer articles
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 a 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

@@ -92,28 +92,28 @@ 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.
113113
- [Brython](https://brython.info/) is a Python transpiler to JavaScript that enables the writing of applications in pure Python without JavaScript.
114114
- [Kotlin](https://kotlinlang.org/docs/reference/js-overview.html) is a modern, concise and safe programming language that can target the browser or Node.
115115

116-
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.
117117

118118
## Summary
119119

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11

22
# دستاویزات اور وضاحتیں
33

4+
<<<<<<< HEAD
45
یہ کتاب ایک *ٹیوٹورئل* ہے۔ اس کا مقصد آپ کو آہستہ آہستہ زبان سیکھنے میں مدد کرنا ہے۔ لیکن ایک بار جب آپ بنیادی باتوں سے واقف ہو جائیں تو آپ کو دوسرے ذرائع کی ضرورت ہوگی۔
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
## وضاحت
711

812
[ECMA-262 وضاحت](https://www.ecma-international.org/publications/standards/Ecma-262.htm) جاوا اسکرپٹ کے بارے میں سب سے زیادہ گہرائی، تفصیلی اور رسمی معلومات پر مشتمل ہے۔ یہ زبان کی وضاحت کرتا ہے۔
913

1014
لیکن رسمی ہونے کی وجہ سے اسے شروع میں سمجھنا مشکل ہے۔ لہذا اگر آپ کو زبان کی تفصیلات کے بارے میں معلومات کے سب سے زیادہ قابل اعتماد ذریعہ کی ضرورت ہے، تو آپ بالکل صحیح جگہ پر آئے ہیں۔ لیکن یہ تیوٹورئل روزمرہ کے استعمال کے لیے نہیں ہے۔
1115

16+
<<<<<<< HEAD
1217
ایک نیا تفصیلاتی ورژن ہر سال جاری کیا جاتا ہے۔
1318
ان ریلیز کے درمیان، تازہ ترین تفصیلات کا مسودہ <https://tc39.es/ecma262> میں ہے۔
19+
=======
20+
A new specification version is released every year. Between these releases, the latest specification draft is at <https://tc39.es/ecma262/>.
21+
>>>>>>> d78b01e9833009fab534462e05c03cffc51bf0e3
1422
1523
انتہائی نئی خصوصیات کے بارے میں پڑھنے کے لیے، بشمول وہ جو "تقریباً معیاری" ہیں (نام نہاد "مرحلہ 3")، <https://github.com/tc39/proposals> میں تجاویز دیکھیں۔
1624

@@ -20,19 +28,32 @@
2028

2129
- **MDN )موزیلا( جاواسکرپٹ ڈاکیومنٹ** مثالوں اور دوسری تفصیلات کے ساتھ ایک بنیادی دستاویز ہے۔
2230

31+
<<<<<<< HEAD
2332
آپ اسے ہیاں دیکھ سکتے ہیں: <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference>
2433

2534
اگرچہ، اکثر بہتر ہوتا ہے کہ آپ انٹرنیٹ پر ہی سرچ کریں۔ استفسار میں "MDN [term]" استعمال کریں، مثال کے طور پر `parseInt` فنکشن کو سرچ کرنے کیلیے آپ <https://google.com/search?q=MDN+parseInt> استعمال کریں گے۔
35+
=======
36+
You can find it at <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference>.
37+
38+
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.
39+
>>>>>>> d78b01e9833009fab534462e05c03cffc51bf0e3
2640
2741
## مطابقت کے ٹیبلز
2842

2943
جاواسکرپٹ ایک ترقی پذیر زبان ہے، اس میں نئے فیچرز روزانہ کی بنیادوں پر ڈالے جا رہے ہیں۔
3044

3145
مختلف براوؑزرز میں ان فیچرز کی سپورٹ دیکھنے کیلیے دیکھیں:
3246

47+
<<<<<<< HEAD
3348
- کسی فیچر کی سپورٹ کیلیے <http://caniuse.com> کو دیکھیں۔ مثال کے طور پر یہ دیکھنے کیلیے کہ کونسے انجن جدید کرپٹوگرافی کے فنکشنز کو سپورٹ کرتے ہیں یہ ڈاکیومنٹ دیکھیں: <http://caniuse.com/#feat=cryptography>
3449
- کونسے انجن کونسے فیچرز کو سپورٹ کرتے ہیں یا نہیں کرتے دیکھنے کیلیے دیکھیں: <https://kangax.github.io/compat-table>
3550

3651
یہ تمام دستاویزات حقیقی دنیا میں استعمال کیلیے مفید ہیں کیونکہ ان میں زبان کی تفصیلات اور سپورٹ وغیرہ کے بارے بہت سی معلومات موجود ہیں۔
52+
=======
53+
- <https://caniuse.com> - per-feature tables of support, e.g. to see which engines support modern cryptography functions: <https://caniuse.com/#feat=cryptography>.
54+
- <https://kangax.github.io/compat-table> - a table with language features and engines that support those or don't support.
55+
56+
All these resources are useful in real-life development, as they contain valuable information about language details, their support, etc.
57+
>>>>>>> d78b01e9833009fab534462e05c03cffc51bf0e3
3758
3859
برائے مہربانی انہیں (یا اس پیج) کو یاد رکھیے تا کہ کسی خاص فیچر کے گہرائی میں مطالعہ کیلیے آپ انہیں پڑھ سکیں۔

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

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
اگر آپ نے ابھی تک کسی IDE کا انتخاب نہیں کیا تو نیچے دیے گئے آپشنز کو چیک کیجیے:
1414

1515
- [Visual Studio Code](https://code.visualstudio.com/) (cross-platform, free).
16-
- [WebStorm](http://www.jetbrains.com/webstorm/) (cross-platform, paid).
16+
- [WebStorm](https://www.jetbrains.com/webstorm/) (cross-platform, paid).
1717

1818
Windows کے لیے "Visual Studio" بھی موجود ہے، اسے "Visual Studio Code" مت سمجھیے۔ "Visual Studio" ایک قیمتی اور پاورفل صرف Windows پر چلنے والا ایڈیٹر ہے جو کہ .Net platform کی ڈویلپمنٹ کے لیے بہترین ہے۔ یہ Javascript کے لیے بھی اچھا ہے۔ Visual Studio کا فری ورژن [Visual Studio Community](https://www.visualstudio.com/vs/community/) بھی موجود ہے۔
1919

@@ -29,17 +29,33 @@ Windows کے لیے "Visual Studio" بھی موجود ہے، اسے "Visual Stud
2929

3030
عملی طور پر، لائٹ ویٹ ایڈیٹرز میں ہو سکتا ہے کہ کافی پلگ اِنز ہوں بشمول پراجیکٹ لیول پر سینٹیکس اینالائز کرنا اور کوڈ کمپلیشن کرنا۔ اس طرح بنیادی طور پر لائٹ ویٹ ایڈیٹر اور IDE میں کوئی سخت فرق کرنے والی کوئی لائن نہیں ہے۔
3131

32+
<<<<<<< HEAD
3233
درج ذیل چیزیں آپ کی توجہ کی منتظر ہیں:
34+
=======
35+
There are many options, for instance:
36+
>>>>>>> d78b01e9833009fab534462e05c03cffc51bf0e3
3337
34-
- [Atom](https://atom.io/) (cross-platform, free).
35-
- [Sublime Text](http://www.sublimetext.com) (cross-platform, shareware).
38+
- [Sublime Text](https://www.sublimetext.com/) (cross-platform, shareware).
3639
- [Notepad++](https://notepad-plus-plus.org/) (Windows, free).
40+
<<<<<<< HEAD
3741
- [Vim](http://www.vim.org/) اور [Emacs](https://www.gnu.org/software/emacs/) بھی اچھے ہیں اگر آپ کو یہ استعمال کرنے آتے ہوں تو۔
42+
=======
43+
- [Vim](https://www.vim.org/) and [Emacs](https://www.gnu.org/software/emacs/) are also cool if you know how to use them.
44+
>>>>>>> d78b01e9833009fab534462e05c03cffc51bf0e3
3845
3946
## چلیں بحث میں نہیں پڑتے
4047

4148
مندرجہ بالا لسٹ میں موجود ایڈیٹرز یا تو میں خود استعمال کرتا ہوں یا میرے وہ دوست جنہیں میں اچھے پروگرامرز سمجھتا ہوں ایک عرصے سے استعمال کر رہیں ہیں اور ان کے ساتھ خوش ہیں۔
4249

4350
ہماری بڑی دنیا میں اور بھی عظیم ایڈیٹرز موجود ہیں۔ برائے مہربانی آپ اس کا انتخاب کیجیے جو آپ کا انتہائی پسندیدہ ہو۔
4451

52+
<<<<<<< HEAD
4553
ایک ایڈیٹر کا انتخاب، کسی بھی دوسرے اوزار کی طرح فرد کی عادات، ذاتی ترجیحات اور پراجیکٹ پر منحصر ہوتا ہے۔
54+
=======
55+
The choice of an editor, like any other tool, is individual and depends on your projects, habits, and personal preferences.
56+
57+
The author's personal opinion:
58+
59+
- I'd use [Visual Studio Code](https://code.visualstudio.com/) if I develop mostly frontend.
60+
- 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).
61+
>>>>>>> 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 @@ Developer tools پاورفل ہیں؛ ان میں بہت سارے فیچرز ہ
2222

2323
یہ کچھ اس طرح دکھائی دیتا ہے:
2424

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

2727
اس developer tool کی خاص بناوٹ Chrome کے ورژن پر منحصر ہے۔ یہ وقت کے ساتھ ساتھ بدلتی رہتی ہے لیکن اس سے ملتی جلتی ہی ہو گی۔
2828

@@ -49,7 +49,11 @@ Developer tools پاورفل ہیں؛ ان میں بہت سارے فیچرز ہ
4949

5050
براؤزرز Safari (Mac براؤزر، جو کہ Windows/Linux پر موجود نہیں) تھوڑا خاص طریقے سے کام کرتا ہے۔ ہمیں پہلے "Develop menu" میں سے اسے Enable کرنا پڑتا ہے۔
5151

52+
<<<<<<< HEAD
5253
پریفرینسز (Preferences) کھولیے اور "Advance" pane میں جائیے۔ نیچے ایک checkbox موجود ہے اسے کلک کیجیے۔
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.
83 KB
Loading

0 commit comments

Comments
 (0)