You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/01-getting-started/1-intro/article.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,26 +24,26 @@ The browser has an embedded engine sometimes called a "JavaScript virtual machin
24
24
25
25
Different engines have different "codenames". For example:
26
26
27
-
-[V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)) -- in Chromeand Opera.
27
+
-[V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)) -- in Chrome, Opera and Edge.
28
28
-[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.
30
30
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 Chromeand 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.
32
32
33
33
```smart header="How do engines work?"
34
34
35
35
Engines are complicated. But the basics are easy.
36
36
37
37
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.
39
39
3. And then the machine code runs, pretty fast.
40
40
41
41
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.
42
42
```
43
43
44
44
## What can in-browser JavaScript do?
45
45
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.
47
47
48
48
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.
49
49
@@ -59,25 +59,25 @@ For instance, in-browser JavaScript is able to:
59
59
60
60
## What CAN'T in-browser JavaScript do?
61
61
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.
63
63
64
64
Examples of such restrictions include:
65
65
66
66
- 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.
67
67
68
68
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.
69
69
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).
72
72
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.
74
74
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.
76
-
- 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.
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.
76
+
- 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 severely limited. Though possible, it requires explicit agreement (expressed in HTTP headers) from the remote side. Once again, that's a safety limitation.
77
77
78
78

79
79
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.
81
81
82
82
## What makes JavaScript unique?
83
83
@@ -86,37 +86,37 @@ There are at least *three* great things about JavaScript:
86
86
```compare
87
87
+ Full integration with HTML/CSS.
88
88
+ 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.
90
90
```
91
91
JavaScript is the only browser technology that combines these three things.
92
92
93
93
That's what makes JavaScript unique. That's why it's the most widespread tool for creating browser interfaces.
94
94
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.
96
96
97
97
## Languages "over" JavaScript
98
98
99
99
The syntax of JavaScript does not suit everyone's needs. Different people want different features.
100
100
101
101
That's to be expected, because projects and requirements are different for everyone.
102
102
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.
104
104
105
105
Modern tools make the transpilation very fast and transparent, actually allowing developers to code in another language and auto-converting it "under the hood".
106
106
107
107
Examples of such languages:
108
108
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.
112
112
-[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
113
-[Brython](https://brython.info/) is a Python transpiler to JavaScript that enables the writing of applications in pure Python without JavaScript.
114
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.
115
115
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.
117
117
118
118
## Summary
119
119
120
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 with full integration in HTML/CSS.
121
+
- Today, JavaScript has a unique position as the most widely-adopted browser language, fully integrated with HTML/CSS.
122
122
- 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.
Copy file name to clipboardExpand all lines: 1-js/01-getting-started/2-manuals-specifications/article.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,35 @@
1
1
2
2
# கையேடுகள் மற்றும் திட்ட விவரம்
3
3
4
+
<<<<<<< HEAD
4
5
இந்த புத்தகம் ஒரு *தனிமுறை கல்வி குறிப்பு* ஆகும். இது படிப்படியாக நிரலாக்க மொழியைக் (Programming Language) கற்றுக்கொள்ள உங்களுக்கு உதவுவதை நோக்கமாகக் கொண்டுள்ளது. நீங்கள் அடிப்படைகளை அறிந்தவுடன், உங்களுக்கு பிற மூல பாடங்கள் தேவைப்படும்.
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
+
>>>>>>> 52c1e61915bc8970a950a3f59bd845827e49b4bf
5
9
6
10
## திட்ட விவரம் (Specification)
7
11
8
12
[ECMA-262 திட்ட விவரமானது](https://www.ecma-international.org/publications/standards/Ecma-262.htm) ஜாவாஸ்கிரிப்ட் (JavaScript) பற்றிய மிக ஆழமான, விரிவான மற்றும் முறைப்படுத்தப்பட்ட தகவல்களைக் கொண்டுள்ளது. இது நிரலாக்க மொழியை வரையறுக்கிறது.
9
13
10
14
அவ்வாறு முறைப்படுத்தப்பட்டிருந்தாலும், நேரடியாக புரிந்துகொள்ள கடினமாக இருக்கும். எனவே, நிரலாக்க மொழி விவரங்களைப் பற்றிய மிகவும் நம்பகமான தகவல்களை தெரிந்து கொள்ள திட்ட விவர குறிப்புகளே சரியான இடமாகும். ஆனால் இவற்றை அன்றாட பயன்பாட்டிற்கு பயன்படுத்த முடியாது.
11
15
16
+
<<<<<<< HEAD
12
17
ஒவ்வொரு ஆண்டும் ஒரு புதிய திட்ட விவரப் பதிப்புரு (version) வெளியிடப்படுகிறது. இந்த வெளியீடுகளுக்கு இடையில், அண்மை கால திட்ட விவர வரைவை காண <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
+
>>>>>>> 52c1e61915bc8970a950a3f59bd845827e49b4bf
13
21
14
22
கிட்டத்தட்ட தர அளவுபடுத்தப்பட்ட ("நிலை 3" என்று அழைக்கப்படுகிறது) மற்றும் புதிய முன்னணி பண்புகளைப் (bleeding-edge features) பற்றி படிக்க, இங்கே உள்ள புத்தாய்வுத்திட்டங்களை <https://github.com/tc39/proposals> பார்க்கவும்.
15
23
24
+
<<<<<<< HEAD
16
25
மேலும், நீங்கள் உலாவிக்காக (browser) உருவாக்குகிறீர்கள் என்றால், இப்பயிற்சியின் [இரண்டாம் பாகம் (second part)](info:browser-environment) இல் மற்ற விவரக்குறிப்புகள் உள்ளன.
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
+
>>>>>>> 52c1e61915bc8970a950a3f59bd845827e49b4bf
17
29
18
30
## கையேடுகள்
19
31
32
+
<<<<<<< HEAD
20
33
-**எம்.டி.என்(MDN) (மொஸில்லா-Mozilla) ஜாவாஸ்கிரிப்ட் குறிப்பு** எடுத்துக்காட்டுகளுடன் கூடிய மற்றும் பிற தகவல்களை கொண்டுள்ள ஒரு கையேடு ஆகும். தனிப்பட்ட நிரலாக்க மொழி செயற்கூறுகள், முறைகள் (methods) மற்றும் பிற ஆழமான தகவல்களைத் தெரிந்து கொள்வது மிகவும் நல்லது.
21
34
22
35
அவைகளை இங்கே காணலாம் <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference>.
@@ -28,6 +41,13 @@
28
41
மேலும், "RegExp MSDN" அல்லது "RegExp MSDN jscript" போன்ற சொற்றொடர்களுடன் இணைய தேடலைப் பயன்படுத்தலாம்.
29
42
30
43
## ஏற்புடைய அட்டவணைகள் (Compatibility tables)
44
+
=======
45
+
-**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.
46
+
47
+
You can find it at <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference>.
48
+
49
+
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.
50
+
>>>>>>> 52c1e61915bc8970a950a3f59bd845827e49b4bf
31
51
32
52
ஜாவாஸ்கிரிப்ட் ஒரு வளரும் மொழி, புதிய அம்சங்கள் தொடர்ந்து சேர்க்கப்படுகின்றன.
-<https://kangax.github.io/compat-table> - நிரலாக்க மொழியின் பண்புகள் எந்தெந்த உலாவி இயந்திரங்களில் பயன்படுத்த முடியும் அல்லது முடியாது என்பதை குறிக்கும் அட்டவணை.
38
58
59
+
<<<<<<< HEAD
39
60
இந்த வளங்கள் அனைத்தும் தினந்தோறும் யதார்த்தத்தில் நாம் பயன்படுத்தக்கூடியவையாக இருக்கும், ஏனெனில் அவை நிரலாக்க மொழியின் விவரங்கள், பண்புகள் மற்றும் இதர மதிப்புமிக்க தகவல்களைக் கொண்டுள்ளன.
40
61
41
62
ஒரு குறிப்பிட்ட பண்பை பற்றிய ஆழமான தகவல்கள் தேவைப்படும்போது, மேலே குறிப்பிட்டுள்ள தகவல்களை (அல்லது இந்தப் பக்கத்தை) நினைவில் கொள்ள வேண்டும்.
63
+
=======
64
+
-<https://caniuse.com> - per-feature tables of support, e.g. to see which engines support modern cryptography functions: <https://caniuse.com/#feat=cryptography>.
65
+
-<https://kangax.github.io/compat-table> - a table with language features and engines that support those or don't support.
66
+
67
+
All these resources are useful in real-life development, as they contain valuable information about language details, their support, etc.
68
+
69
+
Please remember them (or this page) for the cases when you need in-depth information about a particular feature.
0 commit comments