Skip to content

Commit 12035c0

Browse files
Merge pull request #35 from javascript-tutorial/sync-97ef8624
Sync with upstream @ 97ef862
2 parents fe34d65 + 48dd7c6 commit 12035c0

File tree

190 files changed

+1990
-1393
lines changed

Some content is hidden

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

190 files changed

+1990
-1393
lines changed

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# ജാവാസ്ക്രിപ്റ്റ് ഒരു ഇൻട്രൊഡകഷൻ,
22
നമുക്ക് നോക്കാം ജാവാസ്ക്രിപ്റ്റ് എന്താണെന്നും അതിന്റെ പ്രെത്യേകതയെന്നുo,നമുക്ക് അതുകൊണ്ടു എന്തൊക്കെ നേടാം, പിന്നെ ഏതൊക്കെ മറ്റു ടെക്നോളജിസ് അതിന്റെ കൂടെ വർക് ചെയ്യുമെന്ന്.
33

4+
<<<<<<< HEAD
45
## എന്താണ് ജാവാസ്ക്രിപ്റ്റ്
6+
=======
7+
Let's see what's so special about JavaScript, what we can achieve with it, and what other technologies play well with it.
8+
>>>>>>> 97ef86242f9f236b13152e1baf52a55c4db8728a
59
610
*ജാവാസ്ക്രിപ്റ്റ്* ആദ്യമായി ഉപയോഗിച്ചു തുടങ്ങിയത് വെബ്‌പേജുകൾക്ക് ജീവൻ കൊടുക്കാനാണ്.
711

@@ -19,7 +23,13 @@ Javascript ആദ്യമായി പുറത്തിറക്കിയപ
1923

2024
ഇന്ന്, javascript ബ്രൗസർകളിൽ മാത്രമല്ല സെർവർകളിൽ വരെ ഉപയോഗിക്കാൻ പറ്റും, ചുരുക്കിപ്പറഞ്ഞാൽ[the JavaScript engine](https://en.wikipedia.org/wiki/JavaScript_engine) ഉള്ള ഏതൊരു ഡിവൈസിലും അതു ഉപയോഗിക്കാൻ പറ്റും.
2125

26+
<<<<<<< HEAD
2227
ബ്രൗസറുകൾക് സ്വന്തമായി ഒരു ജാവസ്ക്രിപ്റ് എൻജിൻ ഉണ്ടായിരിക്കും "JavaScript virtual machine".
28+
=======
29+
- [V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)) -- in Chrome and Opera.
30+
- [SpiderMonkey](https://en.wikipedia.org/wiki/SpiderMonkey) -- in Firefox.
31+
- ...There are other codenames like "Chakra" for IE, "ChakraCore" for Microsoft Edge, "Nitro" and "SquirrelFish" for Safari, etc.
32+
>>>>>>> 97ef86242f9f236b13152e1baf52a55c4db8728a
2333
2434
പല എഞ്ചിനുകൾക്കും പല "കോഡുനെയിം" ആയിരിക്കും. ഉദാഹരണത്തിന്:
2535

@@ -107,11 +117,26 @@ Engines നല്ല ബുദ്ധിമുട്ടുള്ള ഒരു വ
107117
- [ഫ്ലോ] (http://flow.org/) ഡാറ്റ ടൈപ്പിംഗും ചേർക്കുന്നു, പക്ഷേ മറ്റൊരു രീതിയിൽ. ഫേസ്ബുക്ക് വികസിപ്പിച്ചെടുത്തത്.
108118
- [ഡാർട്ട്] (https://www.dartlang.org/) ബ്രൗസർ ഇതര പരിതസ്ഥിതികളിൽ (മൊബൈൽ അപ്ലിക്കേഷനുകൾ പോലെ) പ്രവർത്തിക്കുന്ന സ്വന്തം എഞ്ചിൻ ഉള്ള ഒരു ഒറ്റപ്പെട്ട ഭാഷയാണ്, മാത്രമല്ല ഇത് ജാവാസ്ക്രിപ്റ്റിലേക്ക് കൈമാറാനും കഴിയും. Google വികസിപ്പിച്ചെടുത്തത്.
109119

120+
<<<<<<< HEAD
110121
കൂടുതൽ ഉണ്ട്. തീർച്ചയായും, ഞങ്ങൾ‌ ട്രാൻ‌സ്‌പൈൽ‌ ചെയ്‌ത ഭാഷകളിലൊന്ന്‌ ഉപയോഗിച്ചാലും, ഞങ്ങൾ‌ ചെയ്യുന്നതെന്താണെന്ന് ശരിക്കും മനസിലാക്കാൻ‌ ഞങ്ങൾ‌ JavaScript നെ അറിഞ്ഞിരിക്കണം.
122+
=======
123+
- [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.
124+
- [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.
125+
- [Flow](http://flow.org/) also adds data typing, but in a different way. Developed by Facebook.
126+
- [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.
127+
- [Brython](https://brython.info/) is a Python transpiler to JavaScript that enables the writing of applications in pure Python without JavaScript.
128+
- [Kotlin](https://kotlinlang.org/docs/reference/js-overview.html) is a modern, concise and safe programming language that can target the browser or Node.
129+
>>>>>>> 97ef86242f9f236b13152e1baf52a55c4db8728a
111130
112131
## സംഗ്രഹം
113132

114133
- ജാവാസ്ക്രിപ്റ്റ് തുടക്കത്തിൽ ഒരു ബ്രൌസർ മാത്രമുള്ള ഭാഷയായി സൃഷ്ടിക്കപ്പെട്ടു, പക്ഷേ ഇപ്പോൾ മറ്റ് പല പരിതസ്ഥിതികളിലും ഇത് ഉപയോഗിക്കുന്നു.
115134
- ഇന്ന്, HTML / CSS മായി പൂർണ്ണമായി സംയോജിപ്പിച്ച് ഏറ്റവും വ്യാപകമായി സ്വീകരിച്ച ബ്രൌസർ ഭാഷയായി ജാവാസ്ക്രിപ്റ്റിന് സവിശേഷമായ ഒരു സ്ഥാനമുണ്ട്.
116135
- ജാവാസ്ക്രിപ്റ്റിലേക്ക് "കൈമാറ്റം ചെയ്യപ്പെടുകയും" ചില സവിശേഷതകൾ നൽകുകയും ചെയ്യുന്ന നിരവധി ഭാഷകളുണ്ട്. ജാവാസ്ക്രിപ്റ്റ് മാസ്റ്റേഴ്സ് ചെയ്തതിനുശേഷം, ചുരുക്കത്തിൽ, അവ പരിശോധിക്കുന്നത് നല്ലതായിരിക്കും.
117136

137+
<<<<<<< HEAD
138+
=======
139+
- JavaScript was initially created as a browser-only language, but it is now used in many other environments as well.
140+
- Today, JavaScript has a unique position as the most widely-adopted browser language with full integration in HTML/CSS.
141+
- 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.
142+
>>>>>>> 97ef86242f9f236b13152e1baf52a55c4db8728a

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,31 @@
1111

1212
പക്ഷെ വളരെ ഫോർമലായത് കൊണ്ടു, തുടക്കമിത് മനസ്സിലാക്കാൻ നല്ല ബുദ്ധിമുട്ടായിരിക്കും. അതിനാൽ, വിശദാംശങ്ങളെക്കുറിച്ചുള്ള ഏറ്റവും വിശ്വാസ്യതയുള്ള ഡാറ്റ സ്രോതസ്സ് നിങ്ങൾക്ക് ആവശ്യമുണ്ടെങ്കിൽ, ഇതൊരു ശരിയായ സ്ഥലമാണ്. എന്നാൽ ഇത് സാധാരണ ഉപയോഗത്തിന് വേണ്ടിയല്ല.
1313

14+
<<<<<<< HEAD
1415
ഓരോ വർഷവും പുതിയൊരു വേർഷൻ അവർ പുറത്തിറക്കും. ഏറ്റവും പുതിയ വേർഷൻ റിലീസിന്റെ കൂടെ <https://tc39.es/ecma262/> ൽ ലഭിക്കുന്നതാണ്.
16+
=======
17+
Also, if you're in developing for the browser, then there are other specifications covered in the [second part](info:browser-environment) of the tutorial.
18+
>>>>>>> 97ef86242f9f236b13152e1baf52a55c4db8728a
1519
1620
പുതിയ സ്റ്റാൻഡേർഡ് ആയിട്ടുള്ള ഫീച്ചേഴ്‌സ് വായിക്കാൻ("stage 3"), ഇവിടെ ഞെക്കിയാൽ മതിയാകും <https://github.com/tc39/proposals>.
1721

22+
<<<<<<< HEAD
1823
കൂടാതെ,നിങ്ങളൊരു ബ്രൌസർ ഡെവലപ്‌ ചെയ്യുകയാണെങ്കിൽ, കുറച്ചു കൂടി ഡീറ്റൈലായിട്ടൊരു [രണ്ടാം ഭാഗം](info:browser-environment) കിട്ടുന്നതാണ്.
24+
=======
25+
- **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.
26+
>>>>>>> 97ef86242f9f236b13152e1baf52a55c4db8728a
1927
2028

29+
<<<<<<< HEAD
2130
- **MDN (Mozilla) JavaScript Reference** ഇതു ഒരുപാട് ഉദാഹരണങ്ങളും മറ്റു കാര്യങ്ങളും അടങ്ങിയ ഒരു മാനുവലാണ് . ഇത് language functions,methods ഉം അതുപോലെ മറ്റു കാര്യങ്ങളെ കുറിച്ചുo ആഴത്തിൽ മനസ്സിലാക്കാൻ നമ്മളെ സഹായിക്കും.
2231

2332
ഒന്നു നോക്കുക <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference>.
2433

2534
അല്ലങ്കിൽ ഇന്റർനെറ്റിൽ സെർച്ച് ചെയ്താലും മതി. സെർച്ച് ചെയ്യുമ്പോൾ "MDN [term]" അടിക്കാൻ മറക്കരുത്, e.g.`parseInt` സെർച്ച് ചെയ്യുന്നത് <https://google.com/search?q=MDN+parseInt>.
2635

36+
=======
37+
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 `parseInt` function.
38+
>>>>>>> 97ef86242f9f236b13152e1baf52a55c4db8728a
2739
2840
- **MSDN** – Microsoft ന്റെ മാന്വലിൽ ജാവസ്ക്രിപ്റ്(j script) ഉൾപ്പടെ ഒരുപാട് ഇൻഫോര്മാഷൻസ് ഉണ്ട്. ഒരാൾക്ക് Internet Explorer സ്പെസിഫിക് ആയിട്ടുള്ള എന്തെങ്കിലും വേണമെങ്കിൽ, അവിടെ പോകുന്നതായിരിക്കും നല്ലത്: <http://msdn.microsoft.com/>.
2941

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88

99
മിക്ക ഡവലപ്പർമാരും ഡെവലപ്‌മെന്റിനായി Chrome അല്ലെങ്കിൽ Firefox ആയിരിക്കുo ആശ്രയിക്കുന്നത്, കാരണം ആ ബ്രൗസറുകളിൽ മികച്ച ഡവലപ്പർ ടൂൾസ് ഉൾപ്പെടുത്തിയിട്ടുണ്ട്. മറ്റ് ബ്രവ്സറുകളും ഡെവലപ്പർ ടൂൾസ് നൽകുന്നു, ചിലപ്പോൾ ചില പ്രത്യേകതകളും അവ നൽകും, പക്ഷേ സാധാരണയായി Chrome അല്ലെങ്കിൽ Firefox ലോട്ടു അനുകരിക്കുകയാണ് അവ ചെയ്യുന്നത്. അതിനാൽ മിക്ക ഡവലപ്പർമാർക്കും അവർക്ക് "ഇഷ്ടപ്പെട്ട" ഒരു ബ്രൗസർ കാണും കൂടാതെ ഒരു ബ്രൗസറിൽ എന്തെങ്കിലും പ്രശ്നമുള്ളതായി തോന്നുകയാണെങ്കിൽ മറ്റുള്ളവയിലേക്കു മാറുകയോ ചെയ്യും.
1010

11+
<<<<<<< HEAD
1112
ഡവലപ്പർ ടൂൾസ് വളരെ ശക്തമാണ്; അവയ്‌ക്ക് നിരവധി സവിശേഷതകളുണ്ട്. നമുക്കിപ്പോൾ, അവ എങ്ങനെ ഓപ്പൺ ചെയ്യാമെന്നും തെറ്റുകൾ എങ്ങനെ നോക്കാമെന്നും javascript command കൾ എങ്ങനെ ടെസ്റ്റ് ചെയ്തു നോക്കാമെന്നും പഠിക്കാം.
13+
=======
14+
Developer tools are potent, they have many features. To start, we'll learn how to open them, look at errors, and run JavaScript commands.
15+
>>>>>>> 97ef86242f9f236b13152e1baf52a55c4db8728a
1216
1317

1418
## Google Chrome

1-js/02-first-steps/01-hello-world/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ So first, let's see how we attach a script to a webpage. For server-side environ
99

1010
## The "script" tag
1111

12-
JavaScript programs can be inserted into any part of an HTML document with the help of the `<script>` tag.
12+
JavaScript programs can be inserted almost anywhere into an HTML document using the `<script>` tag.
1313

1414
For instance:
1515

1-js/02-first-steps/04-variables/2-declare-variables/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ That's simple:
66
let ourPlanetName = "Earth";
77
```
88

9-
Note, we could use a shorter name `planet`, but it might be not obvious what planet it refers to. It's nice to be more verbose. At least until the variable isNotTooLong.
9+
Note, we could use a shorter name `planet`, but it might not be obvious what planet it refers to. It's nice to be more verbose. At least until the variable isNotTooLong.
1010

1111
## The name of the current visitor
1212

1-js/02-first-steps/05-types/article.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,13 @@ const bigInt = 1234567890123456789012345678901234567890n;
8181

8282
As `BigInt` numbers are rarely needed, we don't cover them here, but devoted them a separate chapter <info:bigint>. Read it when you need such big numbers.
8383

84-
```smart header="Compatability issues"
85-
Right now `BigInt` is supported in Firefox/Chrome/Edge, but not in Safari/IE.
84+
85+
```smart header="Compatibility issues"
86+
Right now, `BigInt` is supported in Firefox/Chrome/Edge/Safari, but not in IE.
8687
```
8788

89+
You can check [*MDN* BigInt compatibility table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#Browser_compatibility) to know which versions of a browser are supported.
90+
8891
## String
8992

9093
A string in JavaScript must be surrounded by quotes.
@@ -127,7 +130,7 @@ We'll cover strings more thoroughly in the chapter <info:string>.
127130
```smart header="There is no *character* type."
128131
In some languages, there is a special "character" type for a single character. For example, in the C language and in Java it is called "char".
129132
130-
In JavaScript, there is no such type. There's only one type: `string`. A string may consist of only one character or many of them.
133+
In JavaScript, there is no such type. There's only one type: `string`. A string may consist of zero characters (be empty), one character or many of them.
131134
```
132135

133136
## Boolean (logical type)
@@ -255,7 +258,7 @@ The last three lines may need additional explanation:
255258

256259
There are 8 basic data types in JavaScript.
257260

258-
- `number` for numbers of any kind: integer or floating-point, integers are limited by ±2<sup>53</sup>.
261+
- `number` for numbers of any kind: integer or floating-point, integers are limited by <code>±(2<sup>53</sup>-1)</code>.
259262
- `bigint` is for integer numbers of arbitrary length.
260263
- `string` for strings. A string may have zero or more characters, there's no separate single-character type.
261264
- `boolean` for `true`/`false`.

1-js/02-first-steps/06-alert-prompt-confirm/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ It shows a modal window with a text message, an input field for the visitor, and
3131
: An optional second parameter, the initial value for the input field.
3232

3333
```smart header="The square brackets in syntax `[...]`"
34-
The square brackets around `default` in the syntax above denote that the parameter as optional, not required.
34+
The square brackets around `default` in the syntax above denote that the parameter is optional, not required.
3535
```
3636
3737
The visitor can type something in the prompt input field and press OK. Then we get that text in the `result`. Or they can cancel the input by pressing Cancel or hitting the `key:Esc` key, then we get `null` as the `result`.

1-js/02-first-steps/08-operators/4-fix-prompt/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let b = "2"; // prompt("Second number?", 2);
99
alert(a + b); // 12
1010
```
1111

12-
What we should to is to convert strings to numbers before `+`. For example, using `Number()` or prepending them with `+`.
12+
What we should do is to convert strings to numbers before `+`. For example, using `Number()` or prepending them with `+`.
1313

1414
For example, right before `prompt`:
1515

1-js/02-first-steps/08-operators/article.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,12 @@ Here's a more complex example:
104104
alert(2 + 2 + '1' ); // "41" and not "221"
105105
```
106106
107-
Here, operators work one after another. The first `+` sums two numbers, so it returns `4`, then the next `+` adds the string `1` to it, so it's like `4 + '1' = 41`.
107+
Here, operators work one after another. The first `+` sums two numbers, so it returns `4`, then the next `+` adds the string `1` to it, so it's like `4 + '1' = '41'`.
108+
109+
```js run
110+
alert('1' + 2 + 2); // "122" and not "14"
111+
```
112+
Here, the first operand is a string, the compiler treats the other two operands as strings too. The `2` gets concatenated to `'1'`, so it's like `'1' + 2 = "12"` and `"12" + 2 = "122"`.
108113
109114
The binary `+` is the only operator that supports strings in such a way. Other arithmetic operators work only with numbers and always convert their operands to numbers.
110115
@@ -180,7 +185,7 @@ Parentheses override any precedence, so if we're not satisfied with the default
180185

181186
There are many operators in JavaScript. Every operator has a corresponding precedence number. The one with the larger number executes first. If the precedence is the same, the execution order is from left to right.
182187

183-
Here's an extract from the [precedence table](https://developer.mozilla.org/en/JavaScript/Reference/operators/operator_precedence) (you don't need to remember this, but note that unary operators are higher than corresponding binary ones):
188+
Here's an extract from the [precedence table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence) (you don't need to remember this, but note that unary operators are higher than corresponding binary ones):
184189

185190
| Precedence | Name | Sign |
186191
|------------|------|------|
@@ -214,7 +219,7 @@ alert( x ); // 5
214219
215220
The fact of `=` being an operator, not a "magical" language construct has an interesting implication.
216221
217-
Most operators in JavaScript return a value. That's obvious for `+` and `-`, but also true for `=`.
222+
All operators in JavaScript return a value. That's obvious for `+` and `-`, but also true for `=`.
218223

219224
The call `x = value` writes the `value` into `x` *and then returns it*.
220225

@@ -428,7 +433,7 @@ The list of operators:
428433
- RIGHT SHIFT ( `>>` )
429434
- ZERO-FILL RIGHT SHIFT ( `>>>` )
430435
431-
These operators are used very rarely, when we need to fiddle with numbers on the very lowest (bitwise) level. We won't need these operators any time soon, as web development has little use of them, but in some special areas, such as cryptography, they are useful. You can read the [Bitwise Operators](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators) article on MDN when a need arises.
436+
These operators are used very rarely, when we need to fiddle with numbers on the very lowest (bitwise) level. We won't need these operators any time soon, as web development has little use of them, but in some special areas, such as cryptography, they are useful. You can read the [Bitwise Operators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#Bitwise) chapter on MDN when a need arises.
432437

433438
## Comma
434439

1-js/02-first-steps/09-comparison/1-comparison-questions/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Some of the reasons:
1414

1515
1. Obviously, true.
1616
2. Dictionary comparison, hence false. `"a"` is smaller than `"p"`.
17-
3. Again, dictionary comparison, first char of `"2"` is greater than the first char of `"1"`.
17+
3. Again, dictionary comparison, first char `"2"` is greater than the first char `"1"`.
1818
4. Values `null` and `undefined` equal each other only.
1919
5. Strict equality is strict. Different types from both sides lead to false.
2020
6. Similar to `(4)`, `null` only equals `undefined`.

0 commit comments

Comments
 (0)