Compare commits

...
Sign in to create a new pull request.

2201 commits

Author SHA1 Message Date
Ilya Kantor
bf7d8bb1af
Merge pull request #3220 from joaquinelio/patch-19
Unicode art, grammar suggestions
2022-10-10 17:08:28 +02:00
joaquinelio
6f349121e3
Update article.md 2022-10-10 12:01:15 -03:00
joaquinelio
455c57aa55
Update article.md 2022-10-10 11:54:42 -03:00
joaquinelio
b89b938a06
Update article.md 2022-10-10 11:51:18 -03:00
joaquinelio
69bfbb04cb
Update article.md 2022-10-10 11:36:44 -03:00
joaquinelio
306a197d24
Update article.md 2022-10-10 11:31:13 -03:00
joaquinelio
dc7a157d8f
Update article.md 2022-10-05 11:57:18 -03:00
joaquinelio
dca45f773b
Unicode art, grammar suggestions 2022-10-05 11:29:53 -03:00
Ilya Kantor
18b1314af4 closes #3096 2022-10-02 21:09:02 +02:00
Ilya Kantor
c99d740c01 closes #3179 2022-10-01 22:47:15 +02:00
Ilya Kantor
666f3563cc closes #3190 2022-10-01 19:53:25 +02:00
Ilya Kantor
c5891761a3 closes #3183 2022-10-01 19:45:06 +02:00
Ilya Kantor
c27a7b4d40 closes #3185 2022-10-01 19:39:31 +02:00
Ilya Kantor
aedeed3e5a
Merge pull request #3195 from digital-bw/patch-1
Update task.md
2022-10-01 19:37:52 +02:00
Ilya Kantor
2180da8429
Merge pull request #3197 from digital-bw/patch-2
fix a small typo
2022-10-01 18:33:56 +02:00
Ilya Kantor
2cb64ab34f
Merge pull request #3198 from skromez/master
fix small typo in web-components slots chapter.
2022-10-01 18:33:44 +02:00
Ilya Kantor
586cc5441c
Merge pull request #3199 from digital-bw/patch-3
fix small typo
2022-10-01 18:33:27 +02:00
Ilya Kantor
b24e3fbffb
Merge pull request #3200 from digital-bw/patch-4
grammar suggestion
2022-10-01 18:33:07 +02:00
Ilya Kantor
98d0c2c250
Merge pull request #3201 from MindLaborDev/patch-1
Omitting parentheses after `new`
2022-10-01 18:31:58 +02:00
Ilya Kantor
c8b4d340d3 move Unicode to a separate article 2022-10-01 18:30:25 +02:00
Ilya Kantor
4a9dc8ea94
Merge pull request #3204 from joaquinelio/patch-16
typo
2022-10-01 13:59:58 +02:00
Ilya Kantor
e0621be3b8
Merge pull request #3202 from joaquinelio/patch-15
typo
2022-10-01 13:59:45 +02:00
Ilya Kantor
dc6e7d1698
Merge pull request #3205 from romanstetsyk/master
Change link to the spec
2022-09-30 23:09:05 +02:00
Ilya Kantor
4d42242874
Merge pull request #3206 from ann-kilzer/patch-1
Fix typo "stirng" to "string"
2022-09-30 23:08:48 +02:00
Ilya Kantor
63bc08ef95
Merge pull request #3207 from joaquinelio/patch-17
ECMA broken link
2022-09-30 19:48:39 +02:00
Ilya Kantor
fde193a356
Merge pull request #3208 from wdscxsj/patch-1
Remove description of inconsistency between Chrome and Firefox
2022-09-30 19:47:44 +02:00
Ilya Kantor
15ab2fd059
Merge pull request #3209 from joaquinelio/patch-18
https link
2022-09-30 19:47:16 +02:00
joaquinelio
594bc55841
https link 2022-09-29 13:49:40 -03:00
Yang Yang
24dfb1f30a
Remove description of inconsistency between Chrome and Firefox
Firefox v105 also shows `10px`.
2022-09-29 23:13:45 +08:00
joaquinelio
8d89b7facd
ECMA broken link 2022-09-29 10:58:36 -03:00
Ann Kilzer キルザー杏
f2ef231b6e
Fix typo "stirng" to "string" 2022-09-29 12:08:59 +09:00
romanstetsyk
fe525d2c93 Change link to the spec 2022-09-28 16:11:14 +01:00
joaquinelio
1292386071
typo 2022-09-28 10:03:49 -03:00
Dmitrii
4c693a22c5
Update article.md 2022-09-27 12:02:02 +02:00
joaquinelio
a965e49ad8
typo 2022-09-27 00:04:49 -03:00
Samuel Braun
1b87b89f2b
Omitting parentheses after new
Parentheses can be omitted even if the constructor function has arguments:
```js
new function(test) {
    return { test }
}

// Works the same as
new (function(test) {
    return { test }
})();
```
2022-09-25 14:59:06 +02:00
digital-bw
86ed165f1b
grammar suggestion
contextually 'true' can be confusing after 'false' in sentence: "... false, technically that's true ..."
2022-09-24 19:50:06 +06:00
digital-bw
1575b8a212
fix small typo 2022-09-24 19:41:33 +06:00
Dmitrii
a4877dfbb8
fix typo
I don't see anyone using vice verse with "-" in between, so decided to remove it as well.
2022-09-24 15:30:31 +02:00
digital-bw
dfb97dc9eb
fix a small typo 2022-09-24 19:00:37 +06:00
Ilya Kantor
ff4ef57c8c minor fixes 2022-09-24 13:46:33 +02:00
digital-bw
9e649fb911
Update task.md
Missing '()' invoking a constructor.
2022-09-24 01:25:17 +06:00
Ilya Kantor
2b022eeabb
Merge pull request #3194 from joaquinelio/patch-13
typo
2022-09-23 19:52:07 +02:00
joaquinelio
e7424d4d3c
typo 2022-09-23 14:09:46 -03:00
Ilya Kantor
c990cda098
Merge pull request #3182 from mukulkandhari/patch-3
Update solution.md
2022-09-21 23:06:59 +02:00
Ilya Kantor
4d59152ace
Merge pull request #3192 from tianheg/patch-1
fix markdown syntax
2022-09-21 23:06:36 +02:00
Ilya Kantor
712f47e81d minor fixes 2022-09-21 22:49:56 +02:00
Ilya Kantor
f5511ee714 minor fixes 2022-09-21 22:48:50 +02:00
Ilya Kantor
7c05948829
Merge pull request #3187 from chilipenko/patch-1
Update String type chapter
2022-09-21 21:33:44 +02:00
Ilya Kantor
c2342c1290 minor fixes 2022-09-21 16:54:14 +02:00
Ilya Kantor
bbb50e7750
Merge pull request #3175 from davidshq/patch-2
Update article.md
2022-09-21 16:51:01 +02:00
tianheg
44dc8eb846
fix markdown syntax 2022-09-21 10:15:47 +08:00
Ilya Kantor
42b7197764
Merge pull request #3181 from mukulkandhari/patch-2
Update task.md | Fix grammar
2022-09-20 13:58:13 +02:00
Ilya Kantor
202e625459
Merge pull request #3180 from gleachkr/patch-1
Update article.md
2022-09-20 13:58:02 +02:00
Ilya Kantor
b2586eef31
Merge pull request #3178 from Rnbsov/patch-74
👾 add mdn links to Map and Set methods
2022-09-20 13:56:29 +02:00
Ilya Kantor
89e3a75485
Merge pull request #3177 from davidshq/patch-4
Minor grammar
2022-09-20 13:56:15 +02:00
Ilya Kantor
b0a86b9010 minor fixes 2022-09-20 13:56:05 +02:00
Ilya Kantor
83b7de0b79
Merge pull request #3176 from davidshq/patch-3
Update article.md
2022-09-20 13:55:16 +02:00
Ilya Kantor
55be282f30
Merge pull request #3174 from davidshq/patch-1
Minor grammar
2022-09-20 13:52:45 +02:00
Ilya Kantor
4b5ff839b5
Merge pull request #3170 from KilianSorel/patch-1
Fix typo
2022-09-20 13:52:30 +02:00
Ilya Kantor
b4bbee6549 closes #3168 2022-09-20 13:52:15 +02:00
Ilya Kantor
588e213f3c
Merge pull request #3167 from 0xEddie/master
Clarify instructions of `read` method
2022-09-20 13:48:43 +02:00
Ilya Kantor
267226380b
Merge pull request #3166 from nikandev/patch-1
Update article.md
2022-09-20 13:45:25 +02:00
Alexey Chilipenko
026b1c4c86
Update String type chapter
Update descriptions for Unicode escape sequences.
Add minor fixes for different string methods.
2022-09-15 17:48:23 +03:00
gleachkr
f15700d02c
Update article.md
Simplify wording
2022-09-10 12:20:12 -05:00
Mukul
0f2d22c595
Update solution.md
Fix grammar issues for more clarity
2022-09-09 22:39:37 +05:30
Mukul
4a3e70edbf
Update task.md | Fix grammar
Replace the value in the middle by "Classics". changed to Replace the value in the middle with "Classics" as the word 'with' describes the situation better
2022-09-09 22:34:16 +05:30
gleachkr
5f2b5a8713
Update article.md
Fix typo
2022-09-08 20:07:53 -05:00
Lavrentiy Rubtsov
82156c4432
👾 smth 2022-09-07 02:00:32 +06:00
Lavrentiy Rubtsov
11eef4c69a
👾 add mdn links to Map and Set methods 2022-09-07 01:42:51 +06:00
Dave Mackey
131a3a7d09
Minor grammar 2022-09-06 11:03:36 -04:00
Dave Mackey
0c6a4acd94
Update article.md
Minor grammar changes, clarify that if using a class for `handleEvent` we still are actually using an object as we have to instantiate the class.
2022-09-06 10:33:05 -04:00
Dave Mackey
a6f19fb3ed
Update article.md
Minor changes to grammar
2022-09-06 09:13:22 -04:00
Dave Mackey
5abfab9045
Minor grammar 2022-09-06 09:01:26 -04:00
KilianSorel
a0d6b52971
Fix typo 2022-08-30 06:49:31 +00:00
Eddie
e09ea79a3b
Update task.md 2022-08-28 16:07:53 -06:00
Eddie
c11e773e70
Clarify instructions of read method 2022-08-28 10:54:03 -06:00
Andry
7267abd41b
Update article.md
Adds missing comma on line 24
2022-08-28 12:52:32 +03:00
Ilya Kantor
53b35c1683 closes #3129 2022-08-27 22:22:01 +03:00
Ilya Kantor
93127698f5
Merge pull request #3154 from tangjm/patch-1 2022-08-27 18:15:33 +03:00
Ilya Kantor
c9befae0c5 closes #3155 2022-08-27 18:15:09 +03:00
Ilya Kantor
a6a8045776
Merge pull request #3156 from ani2796/patch-1 2022-08-27 18:14:23 +03:00
Ilya Kantor
f5685ee002
Merge pull request #3157 from tangjm/patch-2 2022-08-27 18:14:02 +03:00
Ilya Kantor
227b338b74 closes #3158 2022-08-27 18:13:50 +03:00
Ilya Kantor
75da3f7028
Merge pull request #3159 from ChidubemAkpu/typo-fix 2022-08-27 18:08:56 +03:00
Ilya Kantor
378d5ff525
Merge pull request #3161 from BabyM0le/master 2022-08-27 18:08:45 +03:00
Ilya Kantor
355e35d473 closes #3162 2022-08-26 23:09:39 +03:00
Tom Padmanathan
ee47fa0598
Fixed Grammar issues 2022-08-25 00:03:18 +01:00
Chidubem Akpu
bb82d62647
Added a missing comma 2022-08-23 12:21:03 +01:00
Jared
262a1db06c
Fix tense 2022-08-22 19:41:41 +01:00
ani2796
219d1013ca
Fix typo 2022-08-21 15:42:18 -04:00
Jared
ae6f9d3cc2
Reword sentence on line 268 2022-08-18 17:02:36 +01:00
Ilya Kantor
1edb0a3833
Merge pull request #3147 from zaks276/patch-1 2022-08-16 18:19:28 +03:00
Mohammed Zakaria Khan
d738e311df
Grammar correction 2022-08-14 19:06:45 +02:00
Ilya Kantor
72aa4f0b97 minor fixes 2022-08-14 15:26:02 +03:00
Ilya Kantor
cbd7d7831c
Merge pull request #3100 from joaquinelio/patch-11 2022-08-14 15:00:22 +03:00
Ilya Kantor
4a983425cb
Merge pull request #3101 from jbritton6/patch-1 2022-08-14 15:00:13 +03:00
Ilya Kantor
01f6378fff
Merge pull request #3103 from iwanderer/patch-1 2022-08-14 14:39:31 +03:00
Ilya Kantor
fb76d3bfee
Merge pull request #3105 from Rnbsov/patch-73 2022-08-14 14:35:27 +03:00
Ilya Kantor
4f3b02f74e
Merge pull request #3107 from san1811/patch-1 2022-08-14 14:34:39 +03:00
Ilya Kantor
6a18f47ffc
Merge pull request #3145 from leviding/patch-6 2022-08-14 14:34:19 +03:00
Ilya Kantor
2f9a190994
Merge pull request #3142 from betofc89/patch-1 2022-08-14 14:34:12 +03:00
Ilya Kantor
1eb3a57249
Merge pull request #3140 from vcodepro/master 2022-08-14 14:33:59 +03:00
Ilya Kantor
eee5b94926
Merge pull request #3139 from peterhauke/patch-3 2022-08-14 14:33:50 +03:00
Ilya Kantor
d98cf5267d
Merge pull request #3136 from rmarasigan/patch-1 2022-08-14 14:32:22 +03:00
Ilya Kantor
12cc61f7f8
Merge pull request #3135 from leviding/patch-5
fix: shash -> backslash
2022-08-14 14:32:13 +03:00
Ilya Kantor
2dbb4f58dc
Merge pull request #3134 from 110nard0/patch-1
Fix typos in array methods article.md
2022-08-14 14:32:01 +03:00
Ilya Kantor
bc0b21c727
Merge pull request #3133 from leviding/patch-4
fix: typo
2022-08-14 14:31:53 +03:00
Ilya Kantor
f9e0a8b171
Merge pull request #3131 from leviding/patch-3
fix: typo
2022-08-14 14:31:41 +03:00
Ilya Kantor
e76420a2ca
Merge pull request #3130 from gionny96/patch-1
Fixed a typo
2022-08-14 14:31:33 +03:00
Ilya Kantor
422bc3b20c
Merge pull request #3128 from LarsiParsii/patch-1
Correcting precedence number
2022-08-14 14:31:23 +03:00
Ilya Kantor
8d4df209c3 minor fixes 2022-08-14 14:31:14 +03:00
Ilya Kantor
3bfb6cd696
Merge pull request #3125 from chilipenko/patch-2
Add Number.isNaN and Number.isFinite
2022-08-14 14:26:34 +03:00
Ilya Kantor
962fa79b96 closes #3122 2022-08-14 12:31:05 +03:00
Ilya Kantor
f0f43667a4
Merge pull request #3121 from chilipenko/patch-1
Update conditions for choosing between toString and valueOf
2022-08-14 12:29:15 +03:00
Ilya Kantor
ed1b44eda3
Merge pull request #3120 from kushanksriraj/patch-1
docs: fix typo (missing verb)
2022-08-14 12:28:45 +03:00
Ilya Kantor
c7da1a00cc closes #3119 2022-08-14 12:28:14 +03:00
Ilya Kantor
e82267ee47
Merge pull request #3118 from bhushan/patch-1
Update article.md
2022-08-14 11:27:55 +03:00
Ilya Kantor
15dacc13de
Merge pull request #3117 from romanstetsyk/master
Update the operator precedence table
2022-08-14 11:27:46 +03:00
Ilya Kantor
caaa05baeb
Merge pull request #3113 from leviding/patch-2
feat: improve type conversion for string with whitespace
2022-08-14 11:26:20 +03:00
Ilya Kantor
5d57a04b66 closes #3111 2022-08-14 11:25:47 +03:00
Ilya Kantor
313b174bf1
Merge pull request #3110 from xmready/patch-1 2022-08-14 11:17:34 +03:00
Ilya Kantor
e6b86f91ec
Merge pull request #3108 from dreamleak/patch-1
Fix typo in pointercancel section
2022-08-14 10:35:48 +03:00
Ilya Kantor
b92302974a
Merge pull request #3146 from SUPERustam/patch-1
Edit precedence of `??` and `||`
2022-08-14 10:34:56 +03:00
Rustam Uzdenov
4935538055
Edit precedence of ?? and ||
Depends on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#Table, precedence of `??` and `||` should be 3 instead of 4
2022-08-13 08:41:17 +03:00
LeviDing
03c5ceb629
fix: typo 2022-08-13 13:29:06 +08:00
Roberto
91ec60d862
Commentary in the wrong line
Looks like the right line for a comment is the line 306 instead of 308.
2022-08-11 20:11:42 -03:00
Alexey Chilipenko
7df4cbbffa
Add Number.isNaN and Number.isFinite to the summary 2022-08-11 19:40:26 +03:00
vcodepro
ebe29f2853 Update article.md (fix '??' and '||' operators precedence number) 2022-08-09 13:45:55 +04:30
Peter Hauke
49af0becee
Correct the English and made minor improvements
This is almost the minimal number of changes that I would make. 

I would still recommend changing "play" in the first line to "work".
2022-08-09 00:11:23 +02:00
Shanelle Marasigan
35e2ed25c8
FIX: "ReferenceError: arr is not defined"
Line 265 and 266: Use 'fruits' instead of the 'arr' variable.
2022-08-08 09:30:47 +08:00
LeviDing
9c0337d0a6
fix: shash -> backslash 2022-08-07 17:58:31 +08:00
110nard0
03dfa1d25d
Fix typos in array methods article.md 2022-08-07 09:59:18 +01:00
LeviDing
f54a20acc6
fix: typo 2022-08-07 15:22:40 +08:00
LeviDing
b6939271e8
fix: typo 2022-08-05 19:35:01 +08:00
Gionatha
187dee3671
Fixed a typo 2022-08-05 10:17:26 +02:00
Lars Fredrik
5a43f6ffef
Correcting for correct precedence number
4 --> 3
2022-08-02 22:51:30 +02:00
Alexey Chilipenko
abaaae5f28
Add Number.isNaN and Number.isFinite 2022-08-01 17:12:02 +03:00
Alexey Chilipenko
f505ecb8b3
Update conditions for choosing between toString and valueOf 2022-07-28 16:37:19 +03:00
Kushank Sriraj
e850873e56
docs: fix typo (missing verb) 2022-07-27 16:36:24 +05:30
Bhushan Gaikwad
2118abbb04
Update article.md 2022-07-25 14:13:04 +05:30
romanstetsyk
69d180e028 Update the operator precedence table
According to MDN, the precedence of unary plus, unary negation,
exponentiation, multiplication, division, addition, and
subtraction is 1 lower than it is in the document
2022-07-21 20:59:18 +01:00
LeviDing
52a6df9b7b
feat: type conversion for string with whitespace 2022-07-20 20:38:13 +08:00
xmready
1bbb11cb4b
Update article.md
Fixed typo
2022-07-18 16:13:43 -07:00
dreamleak
9cba389075
Fix typo in pointercancel section
Noticed that the word implementing was spelt incorrectly within the section for pointercancel events, thus I decided to correct it for reading comprehension reasons.
2022-07-16 15:20:45 -04:00
Sanjay Chaudhari
410279ad53
Update precedence for ??, It's 3 instead of 4 2022-07-16 16:37:48 +05:30
Ilya Kantor
7000ede297
Merge pull request #3104 from xmready/master
Update article.md
2022-07-15 21:31:50 +02:00
Lavrentiy Rubtsov
374d0b3c9d
add runs buttons
to make `alerts` work
2022-07-15 23:37:35 +06:00
xmready
0004be120d
Update article.md
Fixed typo
2022-07-14 16:25:56 -07:00
iwanderer
0d7f95402f
Update index.html
Fixed the wrong sequence
2022-07-14 19:32:00 +08:00
jbritton6
18cecd3207
Additional info on tail-recursion definition 2022-07-13 08:21:23 -04:00
jbritton6
a89d9522be
Removed incorrect info on tail recursion 2022-07-13 08:03:03 -04:00
joaquinelio
dc9683e9da
misspell 2022-07-13 08:36:44 -03:00
Ilya Kantor
55d806dd55
Merge pull request #3098 from nayanadasgupta/3097-remove-atom-from-list-of-code-editors
Removed Atom (Sunsetted) From List Of Code Editors
2022-07-13 08:54:49 +02:00
Ilya Kantor
5dacac743e
Merge pull request #3095 from icarrington/new_branch
Fix Typo
2022-07-13 08:54:07 +02:00
nayanadasgupta
a04ee52bfd Removed Atom (Sunsetted) From List Of Code Editors 2022-07-12 19:27:51 +01:00
icarrington
9cd5bc5935 Fix Typo 2022-07-10 22:49:40 -04:00
Ilya Kantor
82ed8f11b4 minor fixes 2022-07-10 23:56:42 +02:00
Ilya Kantor
13750049c4
Merge pull request #3089 from chilipenko/fix-range-for-number-type
Several fixes for number type
2022-07-10 23:51:19 +02:00
Ilya Kantor
41243575ea
Merge pull request #3090 from Aleksey28/shadow
fix: changed 'template' to '<custom-menu>'
2022-07-10 23:47:23 +02:00
Ilya Kantor
994eeb46f6
Merge pull request #3094 from leviding/patch-1
http -> https
2022-07-10 23:46:28 +02:00
Ilya Kantor
eedb3f3bd5
Merge pull request #3088 from printfinn/patch-1
fix: 1-js/06-advanced-functions/05-global-object
2022-07-10 23:46:18 +02:00
LeviDing
30b7e1d551
Update article.md 2022-07-10 23:52:17 +08:00
Ilya Kantor
3b219ad230
Merge pull request #3079 from peterhauke/patch-1
Improve English language/correct grammar
2022-07-09 18:19:05 +02:00
Aleksey Popov
393efb703a fix: changed 'template' to '<custom-menu>' 2022-07-07 16:56:14 +04:00
Ilya Kantor
4b6654c496 minor fixes 2022-07-06 06:54:03 +02:00
Alexey Chilipenko
e2fc41ea8f
fixed wikipedia link to IEEE-754 standard 2022-07-02 14:34:31 +03:00
Alexey Chilipenko
6726909765
fixed incorrect apostrophe mark 2022-07-02 14:26:46 +03:00
Alexey Chilipenko
8b805b9e16
several fixes in Number chapter 2022-07-02 13:47:57 +03:00
Alexey Chilipenko
79b7f7c8f0
update integers range in Data types chapter 2022-07-02 13:36:20 +03:00
Peter Hauke
d399df7c6f
Remove language style improvements 2022-07-02 06:24:38 +02:00
Gao Fang
2bea6d7278
Update article.md 2022-07-01 13:42:48 +08:00
Ilya Kantor
fe1c4a241f minor fixes 2022-06-29 14:54:06 +03:00
Ilya Kantor
8ffd3f43f2 minor fixes 2022-06-28 21:54:02 +04:00
Ilya Kantor
d8597dd869
Merge pull request #3081 from josephharkins/master
Fixed typo
2022-06-28 10:26:31 +04:00
Ilya Kantor
8b00668b13
Merge pull request #3084 from radlinskii/patch-1
docs: add output comment in Symbols article
2022-06-28 10:26:16 +04:00
Ilya Kantor
c20debcce5 closes #3014 2022-06-28 10:25:58 +04:00
Radliński Ignacy
f569591c07
docs: add output comment in Symbols article 2022-06-27 22:44:33 +02:00
Ilya Kantor
30a5d5e2a7
Merge pull request #3083 from joaquinelio/patch-11
promise minor grammar suggestions
2022-06-26 14:39:34 +02:00
joaquinelio
2fa464474b
promise grammar sugestions 2022-06-26 09:24:12 -03:00
Ilya Kantor
f16e0c8a66 minor fixes 2022-06-26 11:06:17 +04:00
Ilya Kantor
7d9ca8bc5e closes #3039, #3082 2022-06-26 10:33:01 +04:00
Joseph Harkins
72892df72c
Fixed typo
Fixed 'referrer' typo
2022-06-23 23:37:15 +01:00
Ilya Kantor
45ba0d173c
Merge pull request #3078 from joaquinelio/patch-11
"and" instead of "/" just to match previous line
2022-06-23 11:09:08 +03:00
Ilya Kantor
3035448606
Merge pull request #3070 from weilonge/patch-1
A typo fix `updateneeded` in IndexedDB
2022-06-23 11:08:53 +03:00
Ilya Kantor
c29689aa30 minor fixes 2022-06-23 11:00:27 +03:00
Ilya Kantor
23047ab4ee
Merge pull request #3073 from Rnbsov/patch-70
Minor change to array methods article
2022-06-23 10:59:55 +03:00
Ilya Kantor
2293559545
Merge pull request #3074 from webFardin/patch-5
Fixed a typo
2022-06-23 10:59:39 +03:00
Ilya Kantor
fd1278eb8b
Merge pull request #3075 from chilipenko/1-02-05-data-types-separation
Add separation between primitives and objects to the summary
2022-06-23 10:14:12 +03:00
Ilya Kantor
759a730611
Merge pull request #3077 from joaquinelio/linky
WebSocket, some English grammar
2022-06-23 10:09:53 +03:00
Peter Hauke
a134d67e50
Fix one more missing word 2022-06-22 19:12:40 +02:00
Peter Hauke
dde15c974b
Improve English language/correct grammar
In the first paragraph, both of the following are correct:

you'll need other resources.
you'll need access to other sources.

I propose the first version

There is no hyphen in In-between, so you could write here: in between or between - but between is by far better.
2022-06-22 18:53:30 +02:00
joaquinelio
07727ee093
"and" instead of "/" just to match previous line 2022-06-22 11:45:52 -03:00
joaquinelio
b30b705d94 WebSocket, Eng grammar 2022-06-21 18:14:37 -03:00
Alexey Chilipenko
81fb2ab549 Add separation between primitives and objects to the summary 2022-06-21 13:07:51 +03:00
Fardin
d74b37c803
Fixed a typo 2022-06-21 13:15:12 +04:30
Lavrentiy Rubtsov
3e72030521
👾 some change to summary section 2022-06-20 23:46:24 +06:00
Lavrentiy Rubtsov
04c113ce33
👾 smth 2022-06-20 23:01:19 +06:00
Sean Lee
b2f547fb26
A typo fix updateneeded in IndexedDB 2022-06-20 09:27:56 +08:00
Ilya Kantor
7964b11b8f
Merge pull request #3069 from peterhauke/patch-1
Fix language errors and fix broken link
2022-06-19 20:42:11 +03:00
Ilya Kantor
49107519f4 minor fixes 2022-06-19 20:40:05 +03:00
Ilya Kantor
903bbbddf1 fixes #3032 2022-06-19 20:37:12 +03:00
Ilya Kantor
531dced22c
Merge pull request #3065 from Rnbsov/patch-65
👾 smth
2022-06-19 18:08:25 +03:00
Ilya Kantor
6d3d668aa0 minor fixes 2022-06-19 17:42:12 +03:00
Ilya Kantor
2daedb8c1a closes #3019 2022-06-19 17:39:36 +03:00
Ilya Kantor
bb6667a159 closes #3061 2022-06-19 17:26:03 +03:00
Ilya Kantor
965bd6821d
Merge pull request #3064 from smith558/patch-1
Fix typo
2022-06-19 16:53:01 +03:00
Peter Hauke
7c3e3e4a4d
Fix language errors and fix broken link
differ should be differentiate

https://developer.mozilla.org/en-US/search is broken so I changed it to  https://developer.mozilla.org/en-US/

Other language changes are to improve readability and correct minor language errors
2022-06-19 15:44:39 +02:00
Lavrentiy Rubtsov
787638bf2e
👾 smth 2022-06-19 18:09:45 +06:00
Ilya Kantor
ed4a212563 closes #3035 2022-06-19 10:14:58 +03:00
Stanislav (Stanley) Modrak
727786b43e
Fix typo 2022-06-18 22:25:46 +01:00
Ilya Kantor
25952f030f
Merge pull request #2902 from jeffchase/patch-1
Date task solution: use standard date time string
2022-06-18 22:44:39 +03:00
Ilya Kantor
c3b5dc1748
Merge pull request #3004 from OmerBaddour/master
minor fixes
2022-06-18 22:35:35 +03:00
Ilya Kantor
7febbb9d29
Merge pull request #2989 from Rnbsov/patch-39
add commas
2022-06-18 22:32:33 +03:00
Ilya Kantor
02b43dbcbf
Merge pull request #3005 from joaquinelio/patch-11
rephrase
2022-06-18 22:28:34 +03:00
Ilya Kantor
8b295f6a56 closes #3062 2022-06-18 22:25:59 +03:00
Ilya Kantor
964c7db81a
Merge pull request #3060 from smith558/patch-4
Fix grammar and phrasing
2022-06-18 22:07:25 +03:00
Ilya Kantor
77d8c7373f closes #3059 2022-06-18 22:06:38 +03:00
Ilya Kantor
9787f3617d
Merge pull request #3058 from smith558/patch-2
Clarify confusing point
2022-06-18 21:50:19 +03:00
Ilya Kantor
c08dec6b2e
Merge pull request #3057 from Binu42/patch-1
Update article.md
2022-06-18 21:49:39 +03:00
Ilya Kantor
d81a142a2d
Merge pull request #3056 from smith558/patch-1
Fix typo in text
2022-06-18 21:49:21 +03:00
Ilya Kantor
47fec275c4
Merge pull request #3054 from webFardin/patch-4
Fixed setTimeout() issue
2022-06-18 21:49:07 +03:00
Ilya Kantor
325ba6db42
Merge pull request #3013 from Rnbsov/patch-49
 placed missed break lines and remove extra
2022-06-18 21:08:27 +03:00
Ilya Kantor
d6ea9ca115
Merge pull request #3012 from AmirHasanzade/patch-1
Update about.md (change "data" field to "value")
2022-06-18 21:08:14 +03:00
Ilya Kantor
d859d471d4
Merge pull request #3011 from Rnbsov/patch-48
👾 smth
2022-06-18 20:55:35 +03:00
Ilya Kantor
82f42cf286
Merge pull request #3010 from Rnbsov/patch-47
 fixed a typo
2022-06-18 20:54:59 +03:00
Ilya Kantor
392b1914ef
Merge pull request #3008 from Rnbsov/patch-45
👾 just add missed break line
2022-06-18 20:53:46 +03:00
Stanislav (Stanley) Modrak
098f43f7ba
Update text 2022-06-16 18:13:04 +01:00
Stanislav (Stanley) Modrak
556bd7ff38
Fix grammar and phrasing 2022-06-16 17:38:32 +01:00
Stanislav (Stanley) Modrak
250f9a38a8
Clarify confusing point 2022-06-16 16:07:52 +01:00
Binu kumar
acac4dc7f4
Update article.md 2022-06-16 07:02:39 +05:30
Stanislav (Stanley) Modrak
2e52d0313d
Fix typo in text 2022-06-15 15:18:01 +01:00
Ilya Kantor
c3b904def3 minor fixes 2022-06-14 07:30:49 +02:00
Ilya Kantor
bebcbfa134 minor fixes 2022-06-13 23:49:18 +02:00
Ilya Kantor
c028189aba
Merge pull request #3025 from Rnbsov/patch-55
👾 add clarifying example
2022-06-13 23:46:57 +02:00
Ilya Kantor
97202cbda0
Merge pull request #3023 from Rnbsov/patch-53
👾fix typo
2022-06-13 20:08:53 +02:00
Ilya Kantor
dc4d32d58d
Merge pull request #3021 from joaquinelio/patch-13
typo
2022-06-13 20:08:44 +02:00
Ilya Kantor
fff1f64b93
Merge pull request #3020 from Nayoung-Gu/patch-1
just add a comma
2022-06-13 20:08:34 +02:00
Ilya Kantor
48106d72c2
Merge pull request #3018 from Rnbsov/patch-52
👾 update `JSdoc` github link
2022-06-13 20:07:46 +02:00
Ilya Kantor
dd0ac42e95
Merge pull request #3017 from Rnbsov/patch-51
👾smth
2022-06-13 20:07:38 +02:00
Ilya Kantor
da645b513f
Merge pull request #3016 from Rnbsov/patch-50
👾 add information about test functions to summary section
2022-06-13 14:12:02 +02:00
Fardin
7e19bb6b47
Fixed setTimeout() issue
there wasn't any time for setTimeout Function...
2022-06-13 15:07:13 +04:30
Ilya Kantor
9e72417031
Merge pull request #3026 from IamRahulShaw/patch-1
Update article.md
2022-06-13 12:16:45 +02:00
Ilya Kantor
09340308dd
Merge pull request #3027 from Rnbsov/patch-56
👾 fix typo
2022-06-13 12:16:06 +02:00
Ilya Kantor
05a2b8d80d
Merge pull request #3028 from Rnbsov/patch-57
👾 smth
2022-06-13 12:15:56 +02:00
Ilya Kantor
e4d8547836
Merge pull request #3029 from Rnbsov/patch-58
👾 just update link
2022-06-13 12:15:35 +02:00
Ilya Kantor
248fe0d497
Merge pull request #3034 from alfemy/master
Add an absent importance value for a closure task
2022-06-13 12:14:53 +02:00
Ilya Kantor
51c74744f3 minor fixes 2022-06-13 08:13:38 +02:00
Ilya Kantor
5fc0a635e3
Merge pull request #3037 from jarede-dev/patch-1
updated solution.md
2022-06-13 08:04:16 +02:00
Ilya Kantor
7a2365348d
Merge pull request #3015 from super-salad/patch-1
Update article.md
2022-06-13 08:03:51 +02:00
Ilya Kantor
099881de79
Merge pull request #3038 from webFardin/master
add a method to remove style property
2022-06-13 08:01:31 +02:00
Ilya Kantor
8473bb17cb
Merge pull request #3043 from joaquinelio/patch-14
small diff
2022-06-13 07:33:02 +02:00
Ilya Kantor
7bb6066eb6
Merge pull request #3046 from joaquinelio/patch-15
typo?
2022-06-12 23:59:55 +02:00
Ilya Kantor
8ddceabcad
Merge pull request #3048 from Rnbsov/patch-64
👾 add break line
2022-06-12 23:54:38 +02:00
Ilya Kantor
669e6fc555
Merge pull request #3049 from josephharkins/josephharkins-patch-1
Form events navigator.clipboard API Firefox support
2022-06-12 23:54:14 +02:00
Ilya Kantor
08d5c71e2f
Merge pull request #3051 from josephharkins/josephharkins-patch-2
Spelling error and grammar
2022-06-12 23:53:46 +02:00
Ilya Kantor
ca4c4bbec0
Merge pull request #3040 from Rnbsov/patch-59
👾 fix typo
2022-06-12 23:50:58 +02:00
Ilya Kantor
d9f4ff6ee4
Merge pull request #3053 from nintendoit/patch-1
Fix link to MDN bitwise operator docs in (2.18)Javascript specials
2022-06-12 23:46:41 +02:00
nintendoit
28bcd0d7d4
Fix link to MDN bitwise operator docs in (2.18)Javascript specials
The permalink to bitwise operator was incorrect.The link before took to the correct page but not to bitwise operator docs subheading.
2022-06-12 19:57:22 +05:30
Joseph Harkins
5ff69b016b
Grammer fix 2022-06-12 01:41:57 +01:00
Joseph Harkins
c794919f6f
Spelling error
Removed extra 'd' letter
2022-06-12 01:26:10 +01:00
Joseph Harkins
c5dd0c1f87
Update article.md
Stated that navigator.clipboard API is not compatible in Firefox but it is: https://caniuse.com/mdn-api_navigator_clipboard
2022-06-10 23:33:13 +01:00
Lavrentiy Rubtsov
e74089319f
👾 add break line 2022-06-11 01:36:32 +06:00
joaquinelio
e8853e62d1
Update article.md 2022-06-09 12:49:52 -03:00
joaquinelio
ec84c3f8d8
difference, is different 2022-06-08 20:55:10 -03:00
Ilya Kantor
00689d3b0c
Merge pull request #3042 from tanishk15sharma/patch-1
fix: typo
2022-06-09 00:49:22 +02:00
Tanishk Sharma
a79421272e
fix: typo 2022-06-08 11:01:09 +05:30
Lavrentiy Rubtsov
fec6e3dae4
👾 smth 2022-06-07 17:53:53 +06:00
Lavrentiy Rubtsov
d9ab4cf2bc
👾 smth 2022-06-07 17:33:09 +06:00
Lavrentiy Rubtsov
61888a265d
👾 fix typo 2022-06-07 17:29:50 +06:00
Fardin
0ece900f50
add a method to remove style property
I think it's not bad to introduce removeProperty() method :)
2022-06-06 20:08:59 +04:30
Jared
41da5cd8df
updated solution.md
removed redundant spacing
2022-06-05 11:21:23 +08:00
Aleksander Prikhozhdenko
5f28cbb3c6
Add an absent importance value for a closure task 2022-06-02 10:43:39 +07:00
Lavrentiy Rubtsov
7dd8d4cc14
👾 just update link 2022-05-27 20:31:35 +06:00
Lavrentiy Rubtsov
070b777905
👾 smth 2022-05-27 20:25:06 +06:00
Lavrentiy Rubtsov
15ed0d0953
👾 add missed break line 2022-05-27 20:19:36 +06:00
Lavrentiy Rubtsov
293c9b7f47
👾 smth 2022-05-27 20:07:25 +06:00
Lavrentiy Rubtsov
95163bb1f0
👾 fix typo 2022-05-27 19:49:47 +06:00
Rahul Shaw
741db31087
Update article.md 2022-05-25 14:13:33 +05:30
Lavrentiy Rubtsov
c7cc166f72
👾 add clarifying example 2022-05-24 02:08:03 +06:00
Lavrentiy Rubtsov
825cf306e7
👾fix typo 2022-05-24 00:26:32 +06:00
Ilya Kantor
2efe0dce18
Merge pull request #3022 from joaquinelio/patch-14
minor change
2022-05-23 15:41:07 +03:00
joaquinelio
1d6dc01413
minor change
"so it is in memory" reachable or not. For a while at least.
2022-05-23 09:34:44 -03:00
joaquinelio
d2e7ac4160
typo 2022-05-23 08:58:20 -03:00
Nayoung
1c439bf667
just add a comma 2022-05-22 22:27:11 +09:00
Lavrentiy Rubtsov
6d723f4444
👾 update JSdoc github link 2022-05-22 13:16:47 +06:00
Lavrentiy Rubtsov
1dc7900a2d
👾smth 2022-05-21 11:56:36 +06:00
Ilya Kantor
d5e8b6d308 minor fixes 2022-05-21 08:34:42 +03:00
Lavrentiy Rubtsov
ef5bb390d6
👾 smth 2022-05-21 11:11:08 +06:00
Lavrentiy Rubtsov
df1523afa6
👾 add information about test functions to summary section 2022-05-21 11:10:30 +06:00
Gramwise
f2a4aff661
Update article.md
Make the example a bit more inclusive.
2022-05-19 09:26:30 -06:00
Lavrentiy Rubtsov
98899d8546
add missed one 2022-05-17 20:26:03 +06:00
Lavrentiy Rubtsov
212c5275d4
add missed break line and remove extra one 2022-05-17 20:24:34 +06:00
Lavrentiy Rubtsov
98be74f56a
placed missed break line 2022-05-17 20:17:44 +06:00
Amir Hasanzade
38f5cad3e1
Update about.md (change "data" field to "value")
The object returned from "await stream.read()" has two fields: "done" and "value", and not the "data" field destructured here.
2022-05-16 03:12:20 -07:00
Lavrentiy Rubtsov
9cceef1a7f
👾 smth 2022-05-15 18:35:59 +06:00
Lavrentiy Rubtsov
60209e64d9
👾 just add another one missed break line 2022-05-14 15:41:37 +06:00
Lavrentiy Rubtsov
a85e802056
👾 remove one extra break line 2022-05-14 15:37:55 +06:00
Lavrentiy Rubtsov
bb1450055c
fixed a typo
ref: https://github.com/javascript-tutorial/en.javascript.info/issues/3007
2022-05-14 15:26:28 +06:00
Lavrentiy Rubtsov
ad50be199b
👾 just add missed break line 2022-05-14 15:14:26 +06:00
joaquinelio
fb313612a9
rephrase 2022-05-13 18:05:24 -03:00
Omer Baddour
576005b336
minor fixes 2022-05-13 09:28:25 -04:00
Omer Baddour
98e7e6bf23
minor fixes 2022-05-12 10:47:32 -04:00
Lavrentiy Rubtsov
88ce8fa79f
👾 smth 2022-05-12 18:07:31 +06:00
Ilya Kantor
2901e0c645
Merge pull request #2992 from Rnbsov/patch-41
remove extra break lines and add missed
2022-05-12 16:01:19 +04:00
Lavrentiy Rubtsov
b70d33217a
👾 smth 2022-05-12 18:01:02 +06:00
Ilya Kantor
79b9b84a90 closes #2988 2022-05-12 08:40:08 +04:00
Ilya Kantor
22815060c4 integrates #2996 2022-05-12 08:25:24 +04:00
Ilya Kantor
89684c61ff minor fixes 2022-05-12 08:03:28 +04:00
Ilya Kantor
e5fc2f15ed
Merge pull request #2997 from Rnbsov/patch-44
👾 Update summary section
2022-05-12 07:34:57 +04:00
Ilya Kantor
cff15311a0
Merge pull request #2999 from yellottyellott/patch-1
Update jsdoc link
2022-05-12 07:34:37 +04:00
Ilya Kantor
9aee5fc1af
Merge pull request #2993 from Rnbsov/patch-42
smth
2022-05-12 07:31:41 +04:00
Ilya Kantor
8b66d02cea
Merge pull request #2991 from rebeccacremona/rebeccacremona-patch-1
Grammatical fix.
2022-05-12 07:29:07 +04:00
Ilya Kantor
b80af1166b
Merge pull request #2998 from OmerBaddour/master
Minor improvements
2022-05-12 07:24:34 +04:00
Ilya Kantor
012343b717
Merge pull request #2990 from Rnbsov/patch-40
remove one extra break line
2022-05-12 07:24:19 +04:00
Ilya Kantor
e00e87c8d6
Merge pull request #3001 from yellottyellott/yellottyellott-polyfill
Polyfill article tweaks
2022-05-12 07:20:05 +04:00
Ilya Kantor
023b9d5c31
Merge pull request #3003 from yellottyellott/garbage-collection
Small grammatical tweaks to garbage collection
2022-05-12 07:18:49 +04:00
Erick Yellott
f7d079c157 Small grammatical tweaks to garbage collection 2022-05-11 13:21:50 -04:00
Erick Yellott
f26d06b145 Polyfill article tweaks 2022-05-10 22:33:42 -04:00
Erick Yellott
12d8d59089
Update jsdoc link
http://usejsdoc.org seems to be a dead link parked on godaddy atm.

> usejsdoc.org
> is parked free, courtesy of GoDaddy.com.
> Get This Domain

swapped to the link listed in the repo: https://github.com/jsdoc/jsdoc#for-more-information
2022-05-10 11:38:43 -04:00
Omer Baddour
fcfc47a5b6
minor improvements 2022-05-08 23:26:03 -04:00
Lavrentiy Rubtsov
598ca68f21
👾 Update summary section 2022-05-09 08:31:22 +06:00
Lavrentiy Rubtsov
5fa86797bb
add dot 2022-05-07 16:08:18 +06:00
Lavrentiy Rubtsov
35d465c62b
add comma 2022-05-07 15:55:32 +06:00
Lavrentiy Rubtsov
060d8fe8fd
remove another one extra break line 2022-05-07 14:42:05 +06:00
Lavrentiy Rubtsov
d84ebc2258
remove extra break lines 2022-05-07 14:40:09 +06:00
Lavrentiy Rubtsov
2f56ecf1a7
add a missed break line 2022-05-07 14:30:39 +06:00
Lavrentiy Rubtsov
5fcdfc7d66
smth 2022-05-07 14:26:18 +06:00
Lavrentiy Rubtsov
3be0d3ed0b
remove one extra break line 2022-05-07 14:17:41 +06:00
Rebecca Lynn Cremona
d1f5023b6c
Grammatical fix. 2022-05-06 14:51:44 -04:00
Lavrentiy Rubtsov
1402f7006d
remove one extra break line 2022-05-06 20:15:27 +06:00
Lavrentiy Rubtsov
1dcf503dce
add commas 2022-05-06 19:49:20 +06:00
Ilya Kantor
206485fc3a
Merge pull request #2956 from leviding/patch-43
fix: type error in index.html
2022-05-03 23:53:13 +04:00
Ilya Kantor
e74245ea6f
Merge pull request #2957 from TimothyRuszala/patch-1
fix minor grammatical mistakes
2022-05-03 23:52:56 +04:00
Ilya Kantor
c01efda697 minor fixes 2022-05-03 23:52:15 +04:00
Ilya Kantor
a3a1492ebc
Merge pull request #2958 from pavansuthar/pavan-patch-01
Case sensitive word change
2022-05-03 23:52:04 +04:00
Ilya Kantor
54c3fb9d1c
Merge pull request #2959 from Rnbsov/patch-25
minor grammar fix
2022-05-03 23:50:55 +04:00
Ilya Kantor
b60f9fc743
Merge pull request #2960 from Rnbsov/patch-26
add some emphasis
2022-05-03 23:50:47 +04:00
Ilya Kantor
e27d5caa35
Merge pull request #2962 from Luca1152/patch-1
Fix language in 'Methods of primitives' task
2022-05-03 23:49:50 +04:00
Ilya Kantor
5015a76c9a
Merge pull request #2963 from Luca1152/patch-2
Fix grammar in 'Symbol type' article
2022-05-03 23:49:41 +04:00
Ilya Kantor
7af623ea18
Merge pull request #2984 from Rnbsov/patch-35
remove one extra break line
2022-05-03 23:44:44 +04:00
Ilya Kantor
254f82ff41
Merge pull request #2985 from Rnbsov/patch-36
just add a comma
2022-05-03 23:44:36 +04:00
Ilya Kantor
e9dfecc6df
Merge pull request #2986 from Rnbsov/patch-37
typo
2022-05-03 23:44:23 +04:00
Ilya Kantor
12024bc6b8 minor fixes 2022-05-03 23:43:43 +04:00
Ilya Kantor
1dc862c333
Merge pull request #2966 from OmerBaddour/patch-2
minor fix, and explanation improvements
2022-05-03 23:40:48 +04:00
Lavrentiy Rubtsov
0e4767832b
typo 2022-05-04 01:18:30 +06:00
Ilya Kantor
87b5780c79
Merge pull request #2971 from Rnbsov/side-effect
replace side-effect with side effect
2022-05-03 23:15:08 +04:00
Ilya Kantor
ba44374556
Merge pull request #2968 from Rnbsov/patch-27
add missing line break and remove excess one
2022-05-03 22:59:31 +04:00
Ilya Kantor
64d0c11de6
Merge pull request #2969 from Rnbsov/patch-28
add a comma
2022-05-03 22:59:24 +04:00
Ilya Kantor
18a976ba48
Merge pull request #2972 from Rnbsov/patch-29
Update article.md
2022-05-03 22:58:03 +04:00
Ilya Kantor
ad6f23b10f closes #2973 2022-05-03 22:57:52 +04:00
Ilya Kantor
9c5a0774af
Merge pull request #2975 from Rnbsov/patch-30
add a run button
2022-05-03 22:56:37 +04:00
Ilya Kantor
9119ecab23
Merge pull request #2976 from Rnbsov/patch-31
add quotes
2022-05-03 22:56:28 +04:00
Ilya Kantor
da3890aa57
Merge pull request #2977 from Rnbsov/patch-33
add highliting
2022-05-03 22:56:14 +04:00
Ilya Kantor
f65c25d879
Merge pull request #2978 from MondoBurrito/patch-3
Fixed grammatical error.
2022-05-03 22:55:39 +04:00
Lavrentiy Rubtsov
8149cb0a87
just add a comma 2022-05-04 00:55:29 +06:00
Ilya Kantor
6ce9e71505
Merge pull request #2979 from Kirshach/patch-1
update localStorage size limit info
2022-05-03 22:50:24 +04:00
Ilya Kantor
9fcd38f98d
Merge pull request #2981 from Rnbsov/patch-34
add missing break line
2022-05-03 22:48:41 +04:00
Ilya Kantor
5ef143d48e closes #2982 2022-05-03 22:48:27 +04:00
Lavrentiy Rubtsov
bf83b15e1d
remove one extra break line 2022-05-04 00:39:19 +06:00
Ilya Kantor
8eed0d781f
Merge pull request #2964 from OmerBaddour/patch-1
minor typos and English improvements
2022-05-03 22:21:19 +04:00
Lavrentiy Rubtsov
a1cd7b776f
add missing break line 2022-05-01 19:02:44 +06:00
Kirshanov Dmitrii
c5c1d6101f
update localStorage size limit
I think it's safe now to assume that localStorage can store at least 5MB of data since the last time 2MB was mentioned was in 2015 for Android Browser v4 which has a reported global usage of 0.36% according to caniuse.com. Its' current version of 100 seems to support the same 5MB standard
2022-05-01 13:57:34 +02:00
Ryan
b4379c5dc8
Fixed grammatical error.
Line 54: "What functionality we're describing" -- I believe this is a question? Without a question mark, it doesn't make much sense.
2022-04-30 21:04:34 -06:00
Lavrentiy Rubtsov
2cccadc5ee
add highliting 2022-05-01 01:16:47 +06:00
Lavrentiy Rubtsov
cc9b015e1b
add quotes 2022-04-30 14:25:34 +06:00
Lavrentiy Rubtsov
9bcd822a5e
add a run button 2022-04-30 03:31:24 +06:00
Lavrentiy Rubtsov
f8d68ca445
Update article.md 2022-04-26 14:52:47 +06:00
Lavrentiy Rubtsov
37057a7b57
Update article.md 2022-04-26 14:51:28 +06:00
Lavrentiy Rubtsov
4aa9f818e8
replace side-effect with side effect 2022-04-25 23:11:54 +06:00
Lavrentiy Rubtsov
c3d92ec52a
add a comma 2022-04-23 21:04:48 +06:00
Lavrentiy Rubtsov
68aa3ef83c
Update article.md 2022-04-23 16:55:57 +06:00
Omer Baddour
adca4b352b
minor fix, and explanation improvements 2022-04-21 14:18:23 -04:00
Omer Baddour
d62faffa0d
minor typos and English improvements 2022-04-20 14:16:17 -04:00
Luca1152
1f81da024d
Fix grammar in 'Symbol type'
New: That said, all symbols have the `description` property.
Old:   That said, any symbols have `description` property.
2022-04-19 19:01:56 +03:00
Luca1152
888e4b9c3a
Fix language in Methods of primitives task
Use "What do you think" instead of "How do you think".
2022-04-19 18:55:38 +03:00
Lavrentiy Rubtsov
ee1daf7664
Update article.md 2022-04-19 01:47:49 +06:00
Lavrentiy Rubtsov
e424ad23e5
minor grammar fix 2022-04-19 00:50:41 +06:00
pavans
06416483b0 Case sensitive word change
Change of case sensitive word from AppLE to APPLE
2022-04-18 18:01:39 +05:30
Tim Ruszala
bb31eefa04
fix minor grammatical mistakes 2022-04-17 17:10:19 -06:00
LeviDing
95498b469b
Update index.html 2022-04-17 15:42:41 +08:00
LeviDing
cb3380ce07
Update index.html 2022-04-17 15:41:37 +08:00
Ilya Kantor
291b5c05b9 minor fixes 2022-04-16 08:43:33 +03:00
Ilya Kantor
c714756f8f minor fixes 2022-04-15 23:48:06 +03:00
Ilya Kantor
75f5b8af14 minor fixes 2022-04-15 13:46:09 +03:00
Ilya Kantor
f7266b1c4a closes #2952 2022-04-15 11:15:42 +03:00
Ilya Kantor
df822daebe minor fixes 2022-04-15 10:02:55 +03:00
Ilya Kantor
c37c564ae1 minor fixes 2022-04-15 09:14:30 +03:00
Ilya Kantor
344c36fa07 minor fixes 2022-04-15 08:11:09 +03:00
Ilya Kantor
9b95054bcd minor fixes 2022-04-15 08:06:56 +03:00
Ilya Kantor
4695216c79 minor fixes 2022-04-15 08:05:45 +03:00
Ilya Kantor
afbd71d634 minor fixes 2022-04-15 08:05:27 +03:00
Ilya Kantor
7dc2a3c79d minor fixes 2022-04-15 08:05:10 +03:00
Ilya Kantor
0305a0b864 minor fixes 2022-04-15 08:03:25 +03:00
Ilya Kantor
6bf135a11e closes #2931 2022-04-15 07:58:02 +03:00
Ilya Kantor
837fbbae49
Merge pull request #2891 from QiyanYu/patch-1
Update task.md
2022-04-14 09:20:41 +03:00
Ilya Kantor
cd4a72f0c9
Merge pull request #2892 from Rnbsov/patch-5
added a link to wikipedia
2022-04-14 09:20:28 +03:00
Ilya Kantor
2c44dfb647 minor fixes 2022-04-14 09:18:51 +03:00
Ilya Kantor
7826e83ca4
Merge pull request #2897 from joaquinelio/patch-9
mdn link
2022-04-14 09:16:03 +03:00
Ilya Kantor
603170b22e
Merge pull request #2899 from Rnbsov/patch-8
added a possibly missing exclamation mark
2022-04-14 09:15:18 +03:00
Ilya Kantor
98b840e84a minor fixes 2022-04-14 09:09:52 +03:00
Ilya Kantor
06b8b1db9a
Merge pull request #2906 from vabushkevich/form-multipart-fix
fix: replace `form/multipart` with `multipart/form-data`
2022-04-14 09:09:31 +03:00
Ilya Kantor
ed8e41adc4
Merge pull request #2908 from Rnbsov/patch-9
Perhaps it would be more correct
2022-04-14 09:09:11 +03:00
Ilya Kantor
7959adf777 minor fixes 2022-04-14 09:07:41 +03:00
Ilya Kantor
8831603275 minor fixes 2022-04-14 09:06:06 +03:00
Ilya Kantor
d41fcbf18a minor fixes 2022-04-14 09:04:52 +03:00
Ilya Kantor
319f77d6c1
Merge pull request #2941 from sanketshah19/master
Docs: minor grammer fix
2022-04-14 06:47:08 +03:00
Ilya Kantor
c49b104d23 closes #2937 2022-04-14 06:46:56 +03:00
Ilya Kantor
094b15b505
Merge pull request #2936 from glebmikulko/patch-4
Update optional-chaining/article.md
2022-04-14 06:45:30 +03:00
Ilya Kantor
ff2bbc8431
Merge pull request #2935 from gnopor/patch-1
fix typo in the summary section
2022-04-14 06:45:01 +03:00
Ilya Kantor
aac4d48f8f
Merge pull request #2933 from Rnbsov/patch-19
fix units
2022-04-14 06:42:54 +03:00
Ilya Kantor
a5e34ba8d8
Merge pull request #2930 from Rnbsov/patch-21
Fixed the display on the site
2022-04-14 06:40:38 +03:00
Ilya Kantor
3c5cc8edc7
Merge pull request #2929 from Rnbsov/patch-18
Maybe it should be marked as code
2022-04-14 06:40:21 +03:00
Ilya Kantor
ed664f87c2 minor fixes 2022-04-14 06:35:32 +03:00
Ilya Kantor
246156d6e2 minor fixes 2022-04-14 06:35:16 +03:00
Ilya Kantor
613e921f73 closes #2910 2022-04-14 06:35:16 +03:00
Ilya Kantor
1d22a35801
Merge pull request #2926 from apoorvachikara/master
Update article.md
2022-04-14 06:35:03 +03:00
Ilya Kantor
bb0e3604fe
Merge pull request #2922 from guneethind/patch-1
Update article.md
2022-04-14 06:31:44 +03:00
Ilya Kantor
ddb2b10c07
Merge pull request #2917 from Omid-Heidarzadeh/bugfix
Bugfix:binary-arrays/concat/solution
2022-04-14 06:27:17 +03:00
Ilya Kantor
85d07ab504
Merge pull request #2914 from Rnbsov/patch-13
add missed ;
2022-04-14 06:25:52 +03:00
Ilya Kantor
68dea68a0f
Merge pull request #2913 from Rnbsov/patch-12
Delete ; after function declaration
2022-04-14 06:25:44 +03:00
Ilya Kantor
a3273fb3f0
Merge pull request #2942 from Rnbsov/patch-22
add comma
2022-04-14 06:20:10 +03:00
Ilya Kantor
78d5a1b086
Merge pull request #2945 from Rnbsov/patch-24
just add comma
2022-04-14 06:18:52 +03:00
Ilya Kantor
2f194b2602
Merge pull request #2947 from pzolo85/patch-1
fix bitwise hyperlink to mdn
2022-04-14 06:18:41 +03:00
Ilya Kantor
61f79f481c at method 2022-04-14 06:08:46 +03:00
Ilya Kantor
58ef96a61a
Merge pull request #2950 from fredden/its
Correct misuse of "it's"
2022-04-14 05:45:53 +03:00
Ilya Kantor
0cda49ba4c
Merge pull request #2909 from Rnbsov/patch-10
missing dot
2022-04-14 05:44:57 +03:00
Ilya Kantor
6b5749b395 closes #2951 2022-04-14 05:44:11 +03:00
Dan Wallis
6af9a2e2a4
Correct mis-use of "it's" 2022-04-13 11:44:21 +01:00
joe
2c8e9e2793
fix bitwise hyperlink to mdn 2022-04-12 10:35:41 +01:00
Lavrentiy Rubtsov
de9fcf87ee
just add comma 2022-04-12 01:11:35 +06:00
Lavrentiy Rubtsov
10fd8be782
add comma 2022-04-10 15:49:04 +06:00
Sanket Shah
cb2d511a72
Docs: minor grammer fix
Fix grammatical mistake in Type Conversions section
2022-04-09 11:24:39 +05:30
Ilya Kantor
ac7daa516f minor fixes 2022-04-06 11:58:55 +03:00
Ilya Kantor
e1b3dfafcd minor fixes 2022-04-06 11:57:20 +03:00
Ilya Kantor
45934debd9
Merge pull request #2938 from joaquinelio/patch-10
typo
2022-03-31 17:55:48 +03:00
joaquinelio
b1607f5378
typo 2022-03-31 11:54:53 -03:00
Ilya Kantor
63ca152205 clientTop image 2022-03-30 16:13:46 +03:00
Gleb
de4f81e792
Update optional-chaining/article.md
`?.` returns `undefined`
2022-03-30 13:51:54 +04:00
Ilya Kantor
72e958b9c9 minor fixes 2022-03-30 05:27:15 +03:00
Ilya Kantor
f89bbc0c2a minor fixes 2022-03-30 03:36:08 +03:00
Ilya Kantor
4585dbb322 minor fixes 2022-03-30 03:08:41 +03:00
Blaise Tayou
413def7512
fix typo in the summary section 2022-03-29 06:53:02 +01:00
Lavrentiy Rubtsov
ed6bf65eff
fix units 2022-03-28 14:58:39 +06:00
Ilya Kantor
741d90ce8a minor fixes 2022-03-25 22:57:35 +03:00
Ilya Kantor
6edb240b48 minor fixes 2022-03-24 09:13:29 +03:00
Ilya Kantor
d07d5dfa91 minor fixes 2022-03-24 09:07:40 +03:00
Ilya Kantor
78091684e2 minor fixes 2022-03-24 09:04:34 +03:00
Ilya Kantor
f3aeacc86b minor fixes 2022-03-24 08:52:53 +03:00
Ilya Kantor
7ae1e5760c minor fixes 2022-03-24 08:51:21 +03:00
Ilya Kantor
6d29218ad0 minor fixes 2022-03-24 08:46:04 +03:00
Ilya Kantor
bf510dcf62 minor fixes 2022-03-24 08:44:50 +03:00
Ilya Kantor
9e210b78d7 minor fixes 2022-03-24 08:42:12 +03:00
Lavrentiy Rubtsov
39aca70984
fix missed line breaks 2022-03-23 00:00:51 +06:00
Lavrentiy Rubtsov
6e515742e5
Fixed the display on the site 2022-03-22 23:55:20 +06:00
Ilya Kantor
bf6d3c959e minor fixes 2022-03-22 17:51:45 +03:00
Lavrentiy Rubtsov
f613e03f87
Maybe it should be marked as code 2022-03-21 19:51:17 +06:00
apoorvachikara
6eff54a288
Update article.md
- updated incorrect spellings
- Updated the grammar-related errors
2022-03-20 16:45:12 +05:30
Guneet Thind
fe233395cf
Update article.md
corrected a typo in the article summary
line 301  is --> if
2022-03-17 12:27:03 +05:30
Omid Heidarzadeh
ae0a73fc1a Bugfix:binary-arrays/concat/solution 2022-03-15 22:55:51 +03:30
joaquinelio
11e8294173
Update article.md 2022-03-13 10:08:05 -03:00
Lavrentiy Rubtsov
da9c76f9e1
add missed ; 2022-03-12 00:25:19 +06:00
Lavrentiy Rubtsov
d8ba31db57
Delete ; after function declaration 2022-03-12 00:05:30 +06:00
Lavrentiy Rubtsov
fbe6e30ec2
missing a dot 2022-03-06 23:17:00 +06:00
Lavrentiy Rubtsov
3a98822a31
Perhaps it would be more correct 2022-03-06 13:35:37 +06:00
Vyacheslav Abushkevich
21d5bc7243
fix: replace form/multipart with multipart/form-data 2022-03-04 20:46:31 +03:00
Jeff Chase
f6c2b06d12
Date task solution: use standard date time string
The Date article only explains standard strings for date parsing.
Non-standard strings are implementation dependent and should
not be used.
2022-03-01 01:55:01 -05:00
Lavrentiy Rubtsov
8e48598963
added a possibly missing exclamation mark
In the previous article, in a similar example, he was
2022-02-28 06:16:42 +06:00
joaquinelio
22c30fee16
mdn link 2022-02-25 23:23:36 -03:00
Lavrentiy Rubtsov
74563bad32
added a link to wikipedia 2022-02-24 17:14:11 +06:00
Ryan Yu
bfffb32924
Update task.md
Add semi colon for being more clear.
2022-02-23 17:15:23 -08:00
Ilya Kantor
2cca9a9d09
Merge pull request #2885 from Rnbsov/patch-2
Missed exclamation mark
2022-02-21 22:48:37 +03:00
Ilya Kantor
bb41c39247
Merge pull request #2883 from Vitruvius21/patch-1
Fix LI content numbers
2022-02-21 22:40:28 +03:00
Lavrentiy Rubtsov
e1db5dcebe
Missed exclamation mark 2022-02-20 20:33:10 +06:00
ᚷᛁᛟᚱᚷᛁ ᛒᚨᛚᚨᚲᚻᚨᛞᛉᛖ
16ace5ae32
Fix LI content numbers
I think this is more convenient. If one will call chapter.closest('.chapter') they will understand that it returns the first <li class="chapter">
2022-02-19 00:17:37 +04:00
Ilya Kantor
e2f9e58407
Merge pull request #2861 from marahmanjs/patch-1
update webpack url
2022-02-18 17:42:31 +03:00
Ilya Kantor
39da5f8248
Merge pull request #2862 from huyenltnguyen/docs/link
docs: minor grammar fix and link update
2022-02-18 17:42:19 +03:00
Ilya Kantor
54bc5776a9
Merge pull request #2868 from vabushkevich/patch-1
Add mention of radio buttons
2022-02-18 17:41:35 +03:00
Ilya Kantor
d3bfbe3487
Merge pull request #2880 from skaunov/patch-1
Update test.js
2022-02-18 17:38:43 +03:00
Ilya Kantor
883bd606d7
Merge pull request #2881 from leviding/patch-42
fix error in 1-js/13-modules/01-modules-intro/article.md
2022-02-18 17:38:24 +03:00
Ilya Kantor
6eba0627a4
Merge pull request #2872 from umakantv/patch-1
[Fix] Convert message from Buffer to String
2022-02-17 08:36:36 +03:00
LeviDing
79a1b9293b
Update article.md 2022-02-16 09:11:59 +08:00
skaunov
c68cb111a4
Update test.js
Hey there! I suggest to slightly modify the first test case, so its input cover both checks in the solution.
Currently omitting the check for _a_ still let solution to pass the test.
```js
if (/* val < a || */ val > b) {
        arr.splice(i, 1);
        i--;
      }
```
2022-02-15 16:53:29 +03:00
Ilya Kantor
29216730a8 minor fixes 2022-02-12 16:15:38 +03:00
Umakant Vashishtha
d5cce94650
[Fix] Convert message from Buffer to String
Fixed the issue - https://github.com/javascript-tutorial/en.javascript.info/issues/2870
2022-02-10 19:48:31 +05:30
Vyacheslav Abushkevich
efbe490afb
Add mention of radio buttons 2022-02-09 20:37:34 +03:00
Ilya Kantor
d7c8c7506e
Merge pull request #2866 from joaquinelio/patch-9
GB unit symbol
2022-02-08 08:22:48 +03:00
joaquinelio
bf7eb93035
GB unit symbol 2022-02-07 17:01:16 -03:00
Ilya Kantor
1e1f04fe16
Merge pull request #2864 from leviding/patch-40
Precedence of "addition" (binary plus) is 12
2022-02-07 18:23:27 +03:00
LeviDing
962839108f
Update article.md 2022-02-07 23:01:54 +08:00
Huyen Nguyen
5315ba590c docs: minor grammar fix and link update 2022-02-07 11:08:41 +07:00
Anis
8d7a9dd99c
update webpack url
updated webpack url from an older one to latest
2022-02-06 22:47:20 +05:00
Ilya Kantor
71da17e596 minor fixes 2022-02-06 13:19:41 +03:00
Ilya Kantor
f95671cd28 minor fixes 2022-02-06 13:18:25 +03:00
Ilya Kantor
9a2981cf3d minor fixes 2022-02-06 13:18:04 +03:00
Ilya Kantor
c9063dcdd8
Merge pull request #2857 from buynao/master
Update blob article.md
2022-02-06 13:11:09 +03:00
Ilya Kantor
d159503ae6
Merge pull request #2854 from lankerened/patch-1
fix: bug caused by GitHub data change
2022-02-06 13:10:10 +03:00
Ilya Kantor
533d54db86
Merge pull request #2853 from leviding/patch-39
Update operator precedence
2022-02-06 13:10:01 +03:00
Ilya Kantor
7647ab913f minor fixes 2022-02-06 13:05:02 +03:00
law
fb070940ef
Update blob article.md
Updated the latest methods for blob to arrayBuffer, blob to stream, and some tips for using them.
https://developer.mozilla.org/en-US/docs/Web/API/Blob/arrayBuffer
https://developer.mozilla.org/en-US/docs/Web/API/Blob/stream
2022-02-05 22:17:47 +08:00
Ilya Kantor
f2e4db7e66 minor fixes 2022-02-04 14:38:56 +03:00
Ilya Kantor
1f92729254 minor fixes 2022-02-04 14:37:13 +03:00
Ilya Kantor
4db69b43e9 minor fixes 2022-02-04 14:31:54 +03:00
烂柯人
e1be207fe8
Update article.md
fix: bug caused by GitHub data change
2022-02-04 14:12:30 +08:00
LeviDing
fc7bfbb993
Update article.md 2022-02-04 14:07:02 +08:00
Ilya Kantor
9c74908612 minor fixes 2022-02-03 13:35:08 +03:00
Ilya Kantor
843f945aa5
Merge pull request #2839 from ruslauz/fix/operator-precedence
fixes operator precedence
2022-02-03 13:28:16 +03:00
Ilya Kantor
ab0f35b3cb
Merge branch 'master' into fix/operator-precedence 2022-02-03 13:28:04 +03:00
Ilya Kantor
00bfa6da85
Merge pull request #2840 from ruslauz/fix/local-storage-spec-link
Fixes localStorage spec link
2022-02-03 13:27:10 +03:00
Ilya Kantor
d92b1a0eae
Merge pull request #2841 from justinpage/update-constructor-new-article
Include "us" in article sentence
2022-02-03 13:26:54 +03:00
Ilya Kantor
cf49dd9226
Merge pull request #2845 from Omid-Heidarzadeh/minorfix
Minor fix
2022-02-03 13:24:54 +03:00
Ilya Kantor
3ce3f3dc22
Merge pull request #2846 from jovton/master
Update unary + (plus) operator precedence explanation
2022-02-03 13:24:13 +03:00
Ilya Kantor
e9caaaba2f
Merge pull request #2847 from Sen-442b/patch-1
doc-fix: Modified a misplaced comma
2022-02-03 13:23:57 +03:00
Ilya Kantor
31d2b3399f
Merge pull request #2838 from robertmcabee/master
fix formatting, change wording for clarity
2022-02-03 13:23:48 +03:00
Ilya Kantor
9fce97bd73 minor fixes 2022-02-03 13:21:54 +03:00
Ilya Kantor
a678674350 images 2022-02-03 13:08:18 +03:00
Shubhendu Sen
dd3c7a4a33
doc-fix: Modified a misplaced comma 2022-01-29 18:57:23 +05:30
Ilya Kantor
0f748275e2 minor fixes 2022-01-29 06:07:09 +03:00
Sergei Fomin
041bbb2560
Update article.md 2022-01-29 01:03:47 +03:00
jovton
639229e553
Updated unary operator precedence explanation
Removed the double quotes in the explanation for unary operator precedence in the file /1-js/02-first-steps/08-operators/article.md, so that readers do not potentially misinterpret the expression as a string.
2022-01-28 23:19:52 +02:00
Omid Heidarzadeh
69cd45773d minor fix 2022-01-28 12:15:13 +03:30
Justin Page
824bc9635c Include "us" in article sentence 2022-01-25 17:26:04 -08:00
Sergei
5d832d90ec Fixes localStorage spec link 2022-01-25 19:35:03 +03:00
Sergei
779aad7da9 fixes operator precedence 2022-01-25 14:55:31 +03:00
robertmcabee
804b6b0c53
fix formatting, change wording for clarity 2022-01-24 11:53:34 -07:00
Ilya Kantor
bae0ef44d0
Merge pull request #2836 from erolaliyev/patch-1
Correction to precedence levels
2022-01-24 06:21:54 +03:00
Ilya Kantor
025f588571
Merge pull request #2837 from Omid-Heidarzadeh/bugfix-2826-add-missing-tests
fix:Add missing test issue:#2826 & fix related solution
2022-01-22 22:29:30 +03:00
Omid Heidarzadeh
82e5d13b89 fix:Add missing test #2826 & fix related solution 2022-01-22 22:37:02 +03:30
Erol Aliyev
674a9a417a
Correction to precedence levels
Nullish coalescing and logical OR both eqaul to 4 now in MDN table.
2022-01-22 19:13:44 +01:00
Ilya Kantor
1dc6dfbc7c
Merge pull request #2614 from jonathanlu31/patch-1
Fix grammar
2022-01-21 14:06:35 +03:00
Ilya Kantor
36788a57a0
Merge pull request #2758 from KennethKinLum/patch-13
fix sentence
2022-01-21 14:03:22 +03:00
Ilya Kantor
d5f1b4afcf
Merge pull request #2810 from lankerened/master
Update article.md
2022-01-21 13:53:08 +03:00
Ilya Kantor
d7f79982f2
Merge pull request #2816 from joaquinelio/patch-9
redundant
2022-01-21 13:52:51 +03:00
Ilya Kantor
34ab022835 minor fixes 2022-01-21 13:52:39 +03:00
Ilya Kantor
bd0921bd85
Merge pull request #2833 from ArSn/ArSn-add-the-1
added missing "the"
2022-01-21 13:51:34 +03:00
Kolja Zuelsdorf
8b1d32d1f1
added missing "the" 2022-01-21 11:50:20 +01:00
joaquinelio
62b3b9a92b
Update article.md 2022-01-21 07:07:30 -03:00
Ilya Kantor
d5128182a5 minor fixes 2022-01-21 10:45:48 +03:00
Ilya Kantor
eb23b2d7b8
Merge pull request #2814 from kk-source/patch-1
Update article.md
2022-01-21 10:45:35 +03:00
Ilya Kantor
00237ef38d
Merge pull request #2824 from chrisbarbas/patch-1
Added 'the' to first sentence
2022-01-21 10:32:01 +03:00
Ilya Kantor
e7b524caf4
Merge pull request #2825 from bookchiq/master
Add "us" for grammatical reasons
2022-01-21 10:31:46 +03:00
Ilya Kantor
a6fdfda095
Merge pull request #2828 from 11201010/master
Fix spelling error
2022-01-16 10:34:36 +03:00
Ilya Kantor
ffcd38183d
Merge pull request #2803 from tathienphuoc/master
Fix sentence
2022-01-16 10:34:24 +03:00
11201010
421bbe5624
Update article.md
fix spelling error at line 139: "Lke" to "Like"
2022-01-15 16:30:52 +08:00
Sarah Lewis
cc74cccffa
Update article.md
Minor grammar fix
2022-01-13 10:06:23 -08:00
chrisbarbas
a960e3e753
Added 'the' to first sentence
Capturing and bubbling allow us to implement one of [the] most powerful event handling patterns
2022-01-13 04:04:27 -05:00
Ilya Kantor
610fb9366e
Merge pull request #2820 from NickFallman/patch-1
Update article.md
2022-01-10 11:11:38 +03:00
NickFallman
de83e748ad
Update article.md
ms - official international name for millisecond. 1 ms = 1 * 10**(-3) second (or 1e-3). Source : https://en.wikipedia.org/wiki/Metric_prefix .
0.000001 or 1e-6 - it's microsecond. Better name for this variable 'mcs' or 'us'. 'mcs' easier to understand.
2022-01-10 10:58:47 +03:00
joaquinelio
435265ee9d
Update article.md 2022-01-09 19:03:42 -03:00
Ilya Kantor
246c600f11
Merge pull request #2819 from joaquinelio/patch-12
foolproof
2022-01-09 12:21:16 +03:00
joaquinelio
3aaa6fcfca
foolproof
I didnt test it
2022-01-08 23:54:29 -03:00
joaquinelio
ecbb2b8379
redundant 2022-01-08 19:55:36 -03:00
Kartik
3cf22123be
Update article.md
Added missing word in a sentence.
2022-01-07 23:43:14 +05:30
烂柯人
180cb4406d
Update article.md
FIX: fix bug caused by GitHub data change
2022-01-03 10:59:48 +08:00
Ilya Kantor
3c934b5a46 minor fixes 2021-12-24 15:29:51 +03:00
Ilya Kantor
0cd40ae703
Merge pull request #2564 from joaquinelio/patch-10
domain cookie option
2021-12-24 15:24:56 +03:00
joaquinelio
ad0df9950e
Update article.md 2021-12-24 08:53:33 -03:00
Ta Thien Phuoc
199e4123ad Fix sentence 2021-12-21 18:21:29 +07:00
Ilya Kantor
25d51b1db6
Merge pull request #2800 from HiddenOgre28/patch-2
Fix: Rewrite sentence in line 121
2021-12-21 10:28:31 +03:00
Ilya Kantor
3ee59f030b
Merge pull request #2801 from tburette/master
fix the broken RFC link in the JSON article
2021-12-21 10:28:07 +03:00
Ilya Kantor
ad70374397
Merge pull request #2798 from HiddenOgre28/patch-1
Fix sentence in article.md
2021-12-21 10:06:39 +03:00
Ilya Kantor
affee18022
Merge pull request #2796 from joaquinelio/patch-8
transl: easier to change where mdn: dsnt work
2021-12-21 10:06:31 +03:00
Ilya Kantor
96bd8cf145
Merge pull request #2795 from joaquinelio/patch-5
typo
2021-12-21 10:06:23 +03:00
Ilya Kantor
05336f1c0e
Merge pull request #2794 from Manik2375/master
Adding the third header in list
2021-12-21 10:05:55 +03:00
Ilya Kantor
1ee53e62ef
Merge pull request #2802 from odsantos/inheritance-fix-link
Replace 'mdn' link
2021-12-21 09:59:19 +03:00
Osvaldo Dias dos Santos
53488ee2d5 Replace 'mdn' link 2021-12-21 00:20:33 +01:00
Thomas Burette
8536bca288
fix the broken RFC link in the JSON article 2021-12-20 07:40:18 +01:00
HiddenOgre28
e9e06a5f05
Fix: Rewrite sentence in line 121 2021-12-16 11:12:22 -03:00
HiddenOgre28
6fe40fc9cd
Changed a word in article.md
Change the phrase "a property" to "the property" in line 57 (`Here the line (*) sets animal to be a prototype of rabbit.`) because it made it sound like an object can inherit more than one prototype at a time.
2021-12-15 10:15:56 -03:00
joaquinelio
e715c5ac3c
transl: easier to change where mdn: dsnt work 2021-12-14 09:50:24 -03:00
joaquinelio
dc6be3a386
Update article.md 2021-12-13 18:07:25 -03:00
joaquinelio
e7c5d13554
typo 2021-12-13 18:05:13 -03:00
Ilya Kantor
8d04d0d2db minor fixes 2021-12-13 18:31:56 +03:00
Ilya Kantor
98d590ba4a minor fixes 2021-12-13 18:31:50 +03:00
Ilya Kantor
4bd4a746d6 minor fixes 2021-12-13 18:31:16 +03:00
Ilya Kantor
233d63c927 minor fixes 2021-12-13 18:30:32 +03:00
Ilya Kantor
80148c07b1 minor fixes 2021-12-13 18:29:36 +03:00
Ilya Kantor
b0e46f4fc0 minor fixes 2021-12-13 18:29:17 +03:00
Ilya Kantor
9a425777dd minor fixes 2021-12-13 17:56:16 +03:00
Ilya Kantor
974073b255 typeof 2021-12-13 17:55:03 +03:00
Manik Kapoor
353c87dcca typo 2021-12-13 18:32:24 +05:30
Manik Kapoor
92a8a4050a addition-of-third-header-in-list 2021-12-13 18:28:58 +05:30
Ilya Kantor
cbdb2187c0
Merge pull request #2777 from Tofpu/missing-showstep-patch
Included missing showStep methods
2021-12-13 13:16:20 +03:00
Ilya Kantor
7e575de3f1
Merge pull request #2792 from justforuse/patch-1
Typo: touch-events should be touch-action
2021-12-13 13:15:29 +03:00
Allen
cf2ce5e628
Type: touch-events should be touch-action 2021-12-13 09:47:54 +08:00
Ilya Kantor
c5358c5949 themable pictures 2021-12-12 22:53:17 +03:00
Ilya Kantor
e6512a38eb
Merge pull request #2781 from chanjsq/patch-1
fix the broken RFC link
2021-12-12 22:49:07 +03:00
Ilya Kantor
2d80f86a78
Merge pull request #2770 from itaileshem/master
Fix grammar
2021-12-12 22:45:01 +03:00
Ilya Kantor
747fc37a50
Merge pull request #2771 from itaileshem/fix-typo
Fix grammar
2021-12-12 22:44:34 +03:00
Ilya Kantor
fe63de8d16
Merge pull request #2776 from LexaWin/patch-2
Update script.js in Skipping elements example
2021-12-12 22:44:25 +03:00
Ilya Kantor
3a34345090
Merge pull request #2767 from VamsiDevalla/patch-1
Highlighting opening braces for IIFEs
2021-12-12 22:43:53 +03:00
Ilya Kantor
a521d20055 minor fixes 2021-12-12 22:31:42 +03:00
Ilya Kantor
153fd11a85
Merge pull request #2783 from akxavier/master
Added link for Object.keys(user)
2021-12-12 22:30:43 +03:00
Ilya Kantor
df72ada8e9
Merge pull request #2789 from yangsong97/patch-1
Update article.md
2021-12-12 22:30:01 +03:00
Ilya Kantor
64da7ff0d4 minor fixes 2021-12-12 22:26:59 +03:00
Yang Song
c574391332
Update article.md
Added semicolon
2021-12-11 11:08:16 -05:00
akxavier
762d0e5da3 Added reference link to mdn docs for Object.keys(user) 2021-12-06 18:46:14 +05:30
华晨
caf1a650cd
fix the broken RFC link 2021-12-03 00:02:34 +08:00
Tofpu
690c223335
added showStep to our chain in the solution 2021-11-16 09:52:12 +02:00
Tofpu
83d20033e4
added showStep method to our chain in the task 2021-11-16 09:37:00 +02:00
LexaWin
3d9f1c92c8
Update script.js 2021-11-15 20:32:00 +03:00
Ilya Kantor
a829155758 minor fixes 2021-11-12 23:41:35 +03:00
Ilya Kantor
4541b7af75 minor fixes 2021-11-03 16:16:33 +03:00
Itai Leshem
e4c57071d6
Update article.md 2021-11-02 19:57:23 +02:00
Itai Leshem
d4ee188eff
Update article.md 2021-11-02 19:53:01 +02:00
Itai Leshem
e431006ebf
Update article.md 2021-11-02 19:51:17 +02:00
Itai Leshem
f8782ac0a7
Update article.md 2021-11-02 19:45:04 +02:00
Ilya Kantor
15f7acfc2a minor fixes 2021-11-01 23:15:10 +03:00
Ilya Kantor
9fcffe1692 minor fixes 2021-11-01 21:18:36 +03:00
Ilya Kantor
be69f349d0 minor fixes 2021-11-01 21:18:23 +03:00
Ilya Kantor
cc18823108 minor fixes 2021-11-01 20:57:19 +03:00
VAMSI DEVALLA
f9f77a1b80
Highlighting opening braces for IIFEs 2021-10-30 04:21:39 -04:00
Ilya Kantor
6989312841 closes #2752 2021-10-25 23:06:58 +03:00
Ilya Kantor
83085378e3 closes #2757 2021-10-25 23:04:20 +03:00
Ilya Kantor
2ac75262db minor fixes 2021-10-25 22:36:12 +03:00
Ilya Kantor
6be354d049 minor fixes 2021-10-25 22:35:44 +03:00
Ilya Kantor
91e9b9c237 minor fixes 2021-10-25 22:34:12 +03:00
Ilya Kantor
9dc5f3e949 minor fixes 2021-10-25 22:28:11 +03:00
Ilya Kantor
3efe4cf42a
Merge pull request #2759 from KennethKinLum/patch-14
fix typo
2021-10-25 22:26:42 +03:00
Ilya Kantor
676319d985
Merge pull request #2755 from dneey/patch-2
Update article.md
2021-10-25 22:25:17 +03:00
Ilya Kantor
3c62eccbaf
Merge pull request #2753 from vigu86/patch-1
Remove redundant word in Possible Mistakes section
2021-10-25 22:25:09 +03:00
Ilya Kantor
20da2405bc
Merge pull request #2751 from mahdiHashemi14/master
Add missing "!"
2021-10-25 22:24:58 +03:00
Ilya Kantor
aed8070d88
Merge pull request #2750 from Jiapan-Yu/master
not a right comparison
2021-10-25 22:24:37 +03:00
Ilya Kantor
51be747548
Merge pull request #2744 from LexaWin/patch-1
Error correction
2021-10-25 22:19:43 +03:00
Ilya Kantor
e95cab9c45
Merge pull request #2741 from joneskj55/patch-1
sort-by-field fix
2021-10-25 22:16:33 +03:00
Ilya Kantor
2a5c881911 minor fixes 2021-10-25 22:16:15 +03:00
Ilya Kantor
277fbd20e1
Merge pull request #2762 from zaibugemi/master
Fixed a grammatical mistake
2021-10-25 22:12:19 +03:00
Ilya Kantor
3699f73b4c async-await on top 2021-10-25 06:07:03 +03:00
Zuhaib Shah
6250c91183
Merge pull request #1 from zaibugemi/zaibugemi-patch-1
Fixed a grammatical error
2021-10-24 13:27:35 +05:00
Zuhaib Shah
4c2658d60d
Fixed a grammatical error 2021-10-24 13:26:12 +05:00
Kenneth Lum
1310d542ff
fix typo 2021-10-23 15:59:44 -07:00
Kenneth Lum
5af71a9dee
fix sentence 2021-10-23 15:46:39 -07:00
Nee
e0624c31db
Update article.md 2021-10-22 18:49:09 +00:00
Vigu
db074cd4c6
Remove redundant word in Possible Mistakes section 2021-10-22 06:40:40 +02:00
MaHdi
c20baa70ce
Add missing "!" 2021-10-21 12:53:20 +03:30
Jiapan-Yu
4397c7f931
not a right comparison
an empty <div> has its parent element's content area width which may not be zero
2021-10-21 16:33:44 +08:00
Ilya Kantor
eda333d423 minor fixes 2021-10-12 14:19:22 +03:00
LexaWin
91a89eac20
Update article.md
instanceof is only looking for Animal.prototype in the prototype chain, don't Rabbit.prototype
2021-10-11 21:32:36 +03:00
Kevin Jones
e3b10e6185
sort-by-field fix 2021-10-10 16:37:38 -05:00
Ilya Kantor
193319c963
Merge pull request #2705 from imba-tjd/patch-1
Update urls
2021-10-10 19:55:22 +03:00
Ilya Kantor
ab2c57c331
Merge pull request #2704 from wilburn98/master
Update article.md
2021-10-10 19:55:10 +03:00
Ilya Kantor
0d673762fa
Merge pull request #2701 from deisner/patch-1
Update article.md
2021-10-10 19:55:01 +03:00
Ilya Kantor
cbc4350e1e
Merge pull request #2698 from joaquinelio/patch-5
edge
2021-10-10 19:54:17 +03:00
Ilya Kantor
f1210b4f7b minor 2021-10-10 18:51:05 +03:00
Ilya Kantor
2e494c7b28
Merge pull request #2697 from joaquinelio/patch-4
promise chain flow
2021-10-10 18:49:20 +03:00
Ilya Kantor
8794b7112b
Merge pull request #2717 from baooab/patch-9
Update code-editors.md
2021-10-10 18:38:40 +03:00
Ilya Kantor
9e4a1e9428
Merge pull request #2720 from odsantos/object-references
Update URL.
2021-10-10 18:38:19 +03:00
Ilya Kantor
1c6302333e
Merge pull request #2721 from xirly/master
Update article.md
2021-10-10 18:38:09 +03:00
Ilya Kantor
5c1ee32063
Merge pull request #2725 from rizkyzhang/patch-6
Fix typo
2021-10-10 18:37:48 +03:00
Ilya Kantor
3d47402a28
Merge pull request #2729 from fionatagious/patch-1
minor typo
2021-10-10 18:36:58 +03:00
Ilya Kantor
171d2e7469
Merge pull request #2731 from mahdyar/patch-1
chore: fix a typo
2021-10-10 18:36:44 +03:00
Ilya Kantor
f4801c3a17 closes #2738 2021-10-10 18:21:14 +03:00
Mahdyar Hasanpour
2f980540fb
chore: fix a typo 2021-10-04 18:44:46 +03:30
Fiona Tang
7651ae0a6c
minor typo 2021-10-01 15:08:59 -07:00
Ilya Kantor
b09e38c557 minor fixes 2021-09-25 14:44:47 +03:00
Ilya Kantor
7abc297e46 picture minor fixes 2021-09-25 13:29:47 +03:00
Rizky
76ef126471
Fix typo
That importance -> The importance
2021-09-22 15:49:02 +07:00
Vlad
df39e1a998
Update article.md 2021-09-15 01:00:26 +03:00
Osvaldo Dias dos Santos
10590969eb Update URL. 2021-09-14 11:52:12 +01:00
zhangbao
08a530820e
Update article.md
Visual Studio Code has been introduced as an "IDE", so it should no longer appear under "Lightweight editors"
2021-09-12 00:09:46 +08:00
谭九鼎
e69a94338e
Update urls 2021-08-27 13:33:47 +08:00
wilburn98
22b7b51551 Update article.md 2021-08-26 11:17:19 +08:00
David Eisner
623737b79e
Update article.md
Fix typo, minor grammar fix.
2021-08-20 20:31:14 -04:00
joaquinelio
8287e24b96
edge 2021-08-16 11:17:55 -03:00
joaquinelio
1b31575e0d
promise chain flow 2021-08-15 16:36:58 -03:00
Ilya Kantor
4d01fc20d4 minor fixes 2021-08-15 10:39:31 +03:00
Ilya Kantor
a6c0fad468
Merge pull request #2686 from mindv0rtex/patch-1
Make use of `loadJson` inside `loadGithubUser`
2021-08-14 23:42:16 +03:00
Ilya Kantor
3b7a35e4cb
Merge pull request #2692 from siimpragi/patch-1
Fix grammar
2021-08-14 23:37:57 +03:00
Ilya Kantor
71f8a9eb65
Merge pull request #2693 from odsantos/css-animations-typo
Fix typo.
2021-08-14 23:37:48 +03:00
Ilya Kantor
7edd7c320f
Merge pull request #2694 from msmilkshake/patch-1
Update article.md
2021-08-14 23:37:38 +03:00
Ilya Kantor
71688e7590
Merge pull request #2695 from shvchk/master
Fix compound interest formula
2021-08-14 23:37:18 +03:00
Ilya Kantor
ed3b2c0602
Merge pull request #2696 from odsantos/property-descriptors
Update URLs
2021-08-14 23:36:29 +03:00
Ilya Kantor
d3ae613a33
Merge pull request #2683 from RainbowDashy/patch-1
Fix typo
2021-08-14 23:36:11 +03:00
Osvaldo Dias dos Santos
a19e517198 Update URLs 2021-08-14 21:31:15 +01:00
Andrei Shevchuk
f17c07af83 Fix compound interest formula
https://en.wikipedia.org/wiki/Compound_interest
2021-08-14 05:09:29 +03:00
HeyMilkshake
95ad57616e
Update article.md
Missing `let` keyword
2021-08-11 16:47:11 +01:00
Osvaldo Dias dos Santos
d4040872fc Fix typo. 2021-08-10 00:10:34 +01:00
Siim Pragi
6b4cfc2eb3
Fix grammar 2021-08-09 21:07:23 +03:00
Ilya Kantor
bc08fd1b32
Merge pull request #2689 from joaquinelio/patch-8
slider not working on movile
2021-08-08 11:54:12 +03:00
Ilya Kantor
58f9c8d538 minor fixes 2021-08-08 11:24:45 +03:00
joaquinelio
4a7fe13942
Update index.html 2021-08-08 03:34:22 -03:00
joaquinelio
1808fe380e
slider not working on movile 2021-08-08 03:22:49 -03:00
Yan
12d79680e8
Make use of loadJson inside loadGithubUser 2021-08-06 13:38:08 -04:00
p0ny
05a97a029d
Update article.md
fix typo
2021-08-01 13:12:56 +08:00
Ilya Kantor
ef8d576821
Merge pull request #2680 from joaquinelio/patch-4
old and new
2021-07-26 10:33:11 +03:00
joaquinelio
2a6fd54e2b
old and new 2021-07-26 01:16:57 -03:00
Ilya Kantor
57ff060c3c minor fixes 2021-07-24 15:01:48 +03:00
Ilya Kantor
9c5388cd57 pointer events improvements 2021-07-24 15:01:36 +03:00
Ilya Kantor
1b1a2c4b66 minor fixes 2021-07-23 10:14:55 +03:00
Ilya Kantor
2957e71a05 minor fixes 2021-07-23 10:10:17 +03:00
Ilya Kantor
823eea4dae
Merge pull request #2648 from ZYinMD/patch-19
fix typo in 5-network/02-formdata
2021-07-22 23:47:48 +03:00
Ilya Kantor
173ce27589
Merge pull request #2649 from ZYinMD/patch-20
Add 1 letter in 5-network/03-fetch-progress
2021-07-22 23:47:39 +03:00
Ilya Kantor
0082fbe7a3 minor fixes 2021-07-22 23:47:13 +03:00
Ilya Kantor
614c85ad5d minor fixes 2021-07-22 23:37:04 +03:00
Ilya Kantor
df215cd566
Merge pull request #2653 from ZYinMD/patch-21
minor grammar change in webcomponents-intro
2021-07-22 23:22:48 +03:00
Ilya Kantor
cb97b72525
Merge pull request #2661 from WebSavva/patch-1
Response header name is changed to the right one
2021-07-22 23:22:29 +03:00
Ilya Kantor
237d883f1e
Merge pull request #2662 from riri-yu/patch-1
Fix a small grammar mistake
2021-07-22 23:22:11 +03:00
Ilya Kantor
a5f339ef39
Merge pull request #2670 from joaquinelio/patch-6
confusing line
2021-07-22 23:19:17 +03:00
Ilya Kantor
667eb56b8c
Merge pull request #2672 from Gammadon/patch-1
Update article.md
2021-07-22 23:18:53 +03:00
Ilya Kantor
1bf69739d9
Merge pull request #2673 from mahdyar/patch-1
add a missing colon
2021-07-22 23:18:43 +03:00
Ilya Kantor
c3214e7684
Update article.md 2021-07-21 22:36:11 +03:00
Mahdyar Hasanpour
ce382738f9
add a missing colon 2021-07-17 18:05:27 +04:30
Gammadon
19ec58ba65
Update article.md 2021-07-16 16:12:08 -05:00
joaquinelio
02c75d2d5b
Update task.md 2021-07-13 02:55:56 -03:00
joaquinelio
89e22f8565
confusing line 2021-07-13 02:08:30 -03:00
Yuri Lee
16de27d116
Fix a small grammar mistake
There was a tiny grammar mistake that I fixed by switched the words around.
2021-07-04 19:07:41 +09:00
WebSavva
e1952568c9
Response header name is changed to the right one 2021-07-03 14:02:52 +03:00
Ilya Kantor
2275894801
Merge pull request #2657 from Manik2375/generator.return
Add Generator.return
2021-07-01 13:41:10 +03:00
Ilya Kantor
16b9bdaca9 minor fixes 2021-06-28 23:58:26 +03:00
Ilya Kantor
76656bdd15 minor fixes 2021-06-27 15:25:01 +03:00
Ilya Kantor
8752573cf3 minor fixes 2021-06-27 15:24:42 +03:00
Ilya Kantor
8db65194dc minor fixes 2021-06-27 15:23:40 +03:00
Manik Kapoor
624b48b108
Update article.md 2021-06-27 12:50:01 +05:30
Manik Kapoor
bed62e1459
Add generator.return
Add generator.throw, yeah we don't use it much but it's good to know about it.
2021-06-27 12:46:29 +05:30
Ilya Kantor
7725acc4df minor fixes 2021-06-27 00:41:46 +03:00
Ilya Kantor
9bba5702fe minor fixes 2021-06-26 21:05:27 +03:00
Ilya Kantor
e8d7f3784a minor fixes 2021-06-26 21:02:48 +03:00
Ilya Kantor
6dda47fbd7 minor fixes 2021-06-26 20:59:48 +03:00
Ilya Kantor
54688eb9ce minor fixes 2021-06-26 20:58:21 +03:00
Ilya Kantor
4ed51aa48c minor fixes 2021-06-26 20:29:00 +03:00
Ilya Kantor
a0af69e813 minor fixes 2021-06-26 20:26:32 +03:00
Ilya Kantor
e9d2a31796 minor fixes 2021-06-26 20:25:51 +03:00
Ilya Kantor
dab34f744c minor fixes 2021-06-26 20:24:25 +03:00
Ilya Kantor
c0010682be minor fixes 2021-06-25 08:35:05 +03:00
Ilya Kantor
e79ce9d98a minor fixes 2021-06-25 08:29:08 +03:00
Ilya Kantor
e06bc63aa0 minor fixes 2021-06-24 23:57:58 +03:00
Ilya Kantor
e6098157be minor fixes 2021-06-24 23:57:34 +03:00
Ilya Kantor
4420427aa2 minor fixes 2021-06-24 23:25:07 +03:00
Ilya Kantor
934d32be5b minor fixes 2021-06-24 23:24:53 +03:00
Ilya Kantor
27af482dd8 minor fixes 2021-06-24 23:07:35 +03:00
Ilya Kantor
28112112bf minor fixes 2021-06-24 23:01:26 +03:00
Ilya Kantor
2eb4251ce9 minor fixes 2021-06-24 22:50:53 +03:00
Ilya Kantor
771aab479d minor fixes 2021-06-24 22:50:42 +03:00
Ilya Kantor
6c15ba465d minor fixes 2021-06-24 22:50:01 +03:00
Ilya Kantor
32f01fb6b1 minor fixes 2021-06-24 22:41:26 +03:00
Ilya Kantor
7d838b3452 minor fixes 2021-06-24 22:00:59 +03:00
Ilya Kantor
753182bb3d minor fixes 2021-06-24 22:00:53 +03:00
Ilya Kantor
2961588908 minor fixes 2021-06-24 22:00:37 +03:00
Ilya Kantor
8b3730be89 minor fixes 2021-06-24 21:59:48 +03:00
Ilya Kantor
c41361f544 animation 2021-06-24 21:49:27 +03:00
Ilya Kantor
9b99012634
Merge pull request #2654 from ZYinMD/patch-24
add notes about CSS animation performance
2021-06-24 19:41:28 +03:00
Z Yin
b855f6c9db
add a section about css animation performance 2021-06-24 12:06:25 -04:00
Z Yin
c4efc35899
minor grammar change in webcomponents-intro 2021-06-23 17:56:37 -04:00
Z Yin
d7c2f0819e
Add one letter in 5-network/03-fetch-progress 2021-06-22 17:57:28 -04:00
Z Yin
66bad3f50b
fix typo in 5-network/02-formdata 2021-06-22 15:46:50 -04:00
Ilya Kantor
b19a6f0803 minor fixes 2021-06-21 23:32:07 +03:00
Ilya Kantor
8558fa8f5c
Merge pull request #2638 from ZYinMD/patch-16
update one code comment in 1-js/09-classes/04-private-protected-properties-methods
2021-06-20 09:02:02 +03:00
Ilya Kantor
ffe91a6f9a
Merge pull request #2643 from joaquinelio/patch-6
typo
2021-06-20 09:01:14 +03:00
Ilya Kantor
140c75d299
Merge pull request #2644 from Yoona8/master
Typo in Ch 15 Functions
2021-06-20 09:00:39 +03:00
Elena Valeeva
9847492838
Typo in Ch 15 Functions 2021-06-20 08:12:59 +03:00
joaquinelio
52eaa63aaa
typo 2021-06-19 21:21:24 -03:00
Ilya Kantor
6f14c398ef
Merge pull request #2639 from joaquinelio/patch-4
Maybe. "Accessors" link
2021-06-20 00:58:01 +03:00
Ilya Kantor
1b16f9d09a
Merge pull request #2640 from ZYinMD/patch-17
slightly improve clarity of Promise.all()
2021-06-20 00:56:53 +03:00
Ilya Kantor
36613935fe minor fixes 2021-06-19 18:59:39 +03:00
Ilya Kantor
7dacfd411b minor fixes 2021-06-19 18:59:04 +03:00
Ilya Kantor
de81cb4809 minor fixes 2021-06-19 18:58:37 +03:00
Ilya Kantor
e769408d64 minor fixes 2021-06-19 18:55:00 +03:00
Ilya Kantor
df6e5a4522 minor fixes 2021-06-19 18:53:06 +03:00
Ilya Kantor
54347b7116 minor fixes 2021-06-19 18:50:59 +03:00
Ilya Kantor
a40ca9a4a3 minor fixes 2021-06-19 18:50:41 +03:00
Ilya Kantor
85282ef4ad minor fixes 2021-06-19 18:50:12 +03:00
Ilya Kantor
cf82cc3bce minor fixes 2021-06-19 18:49:46 +03:00
Ilya Kantor
ff53f0638b minor fixes 2021-06-19 18:48:57 +03:00
Ilya Kantor
e8777963b2 closes #2641 2021-06-19 18:44:32 +03:00
Ilya Kantor
e49bc3bbc4
Merge pull request #2627 from ZYinMD/patch-5
minor edit to 1-js/05-data-types/02-number/
2021-06-19 13:41:05 +03:00
Z Yin
d43bdd28eb
slightly improve clarity on Promise.all() 2021-06-18 23:37:39 -04:00
joaquinelio
c45e78fdff
Maybe. "accessors" link 2021-06-18 18:09:05 -03:00
Z Yin
de36d0dffb
update one code comment in 1-js/09-classes/04-private-protected-properties-methods
It looks like code was changed some time ago, but comments didn't change accordingly.
2021-06-18 13:18:05 -04:00
Ilya Kantor
29f0121b1c
Merge pull request #2636 from NNboru/patch-1
Unnecessary escape characters in cookie.js
2021-06-18 19:49:24 +03:00
Ilya Kantor
a6dfbb7574 minor fixes 2021-06-18 19:48:55 +03:00
Ilya Kantor
492f506fbd
Merge pull request #2555 from joaquinelio/patch-6
transpiler def
2021-06-18 19:48:03 +03:00
joaquinelio
263f57ed41
Update article.md 2021-06-18 06:12:58 -03:00
joaquinelio
0c41930be9
Update article.md 2021-06-18 05:57:45 -03:00
joaquinelio
8cf2d51e7d
Update article.md 2021-06-18 04:40:04 -03:00
joaquinelio
8c910b4ace
Update article.md 2021-06-18 04:39:25 -03:00
Rohan Rawat
cd466c514a
Unnecessary escape characters in cookie.js
Removed unnecessary escape characters from regex in "getCookie function in cookie.js" - 
. ( ) [ / +
The above characters don't need escaping.
2021-06-18 01:54:25 +05:30
Ilya Kantor
9680c673a3
Merge pull request #2633 from joaquinelio/patch-4
"inserts into" instead of "appends to"
2021-06-16 15:00:57 +03:00
joaquinelio
497ca99529
Update article.md 2021-06-16 08:32:53 -03:00
joaquinelio
2dce19e3e9
"inserts into" instead of "appends to" 2021-06-16 02:05:38 -03:00
Ilya Kantor
fb4fc33a22 minor fixes 2021-06-15 09:23:16 +03:00
jonathanlu31
727d314238
Minor changes in grammar and word choice 2021-06-14 13:42:59 -07:00
jonathanlu31
0786cfac09
Change back miscorrected typo 2021-06-14 13:27:08 -07:00
Ilya Kantor
b258e8fd00 minor fixes 2021-06-14 10:36:59 +03:00
Ilya Kantor
e527c612c2
Merge pull request #2630 from ZYinMD/patch-10
fix typo in 1-js/05-data-types/03-string
2021-06-14 01:53:44 +03:00
Z Yin
a171b0a24f
fix typo in 1-js/05-data-types/03-string 2021-06-13 18:51:33 -04:00
Ilya Kantor
614e29e99a minor fixes 2021-06-14 01:49:46 +03:00
Ilya Kantor
e2d182364e minor fixes 2021-06-14 01:48:06 +03:00
Z Yin
3d88d3322e
Update article.md 2021-06-13 16:48:40 -04:00
Ilya Kantor
617dfc7b04 minor fixes 2021-06-13 11:46:06 +03:00
Ilya Kantor
225a36fd55 Merge branch 'master' of github.com:javascript-tutorial/en.javascript.info 2021-06-13 11:05:24 +03:00
Ilya Kantor
bcf2e48443 minor fixes 2021-06-13 11:05:18 +03:00
Ilya Kantor
ee5853d724
Merge pull request #2604 from odsantos/regex-methods
Fix typo.
2021-06-13 11:04:28 +03:00
Ilya Kantor
e4ac60330b
Merge pull request #2605 from web-padawan/patch-1
Remove mentions of :host-context
2021-06-13 11:03:56 +03:00
Ilya Kantor
4d46f121c2
Merge pull request #2606 from Dorin-David/patch-1
Update article.md
2021-06-13 11:03:35 +03:00
Ilya Kantor
5f927bd7dc
Merge pull request #2611 from AhmedElaguab/master
Fix typo
2021-06-13 11:02:45 +03:00
Ilya Kantor
bcb47b74cb
Merge pull request #2612 from joaquinelio/patch-4
"not required" vs "incorrect"
2021-06-13 11:02:19 +03:00
Ilya Kantor
2290bd6080
Merge pull request #2616 from joaquinelio/patch-8
easier to read
2021-06-13 11:00:03 +03:00
Ilya Kantor
dcf4b5b4de closes #2619 2021-06-13 10:59:53 +03:00
Ilya Kantor
581117ffe0
Merge pull request #2621 from leviding/patch-36
FIX: The range of hexadecimal numbers is 0-9 or A-F
2021-06-13 10:47:51 +03:00
Ilya Kantor
2b1600e883
Merge pull request #2622 from leviding/patch-37
FIX: minor typo error
2021-06-13 10:47:39 +03:00
Ilya Kantor
54ff266be7
Merge pull request #2623 from joaquinelio/patch-9
typo
2021-06-13 10:47:26 +03:00
Ilya Kantor
1ccd673705
Merge pull request #2624 from joaquinelio/patch-11
typpo
2021-06-13 10:47:16 +03:00
Ilya Kantor
964ba1530f function parameters vs arguments 2021-06-13 10:46:23 +03:00
joaquinelio
0e49461c92
typpo 2021-06-10 00:02:47 -03:00
joaquinelio
68172cc9c4
typo 2021-06-10 00:00:57 -03:00
Ilya Kantor
581802dad3 minor fixes 2021-06-09 07:08:21 +03:00
LeviDing
6a742c4a94
Update article.md 2021-06-08 23:18:44 +08:00
LeviDing
52cb884565
Update article.md 2021-06-07 23:58:40 +08:00
joaquinelio
c2d5f8e140
easier to read 2021-06-04 07:06:50 -03:00
jonathanlu31
8f039d3806
Fix grammar and typos in mouse events basics 2021-06-02 11:32:08 -07:00
jonathanlu31
ffcb5da587
Fix grammar 2021-06-02 11:11:48 -07:00
joaquinelio
4c35f5998a
"not required" vs "incorrect" 2021-05-29 18:40:18 -03:00
Ahmed Elaguab
88ba2c2d6d
Merge pull request #2 from AhmedElaguab/AhmedElaguab-fix-typo
Update article.md
2021-05-28 16:55:17 +01:00
Ahmed Elaguab
f8313dc936
Update article.md 2021-05-28 16:53:44 +01:00
Ilya Kantor
cf33b67042 minor fixes 2021-05-24 12:00:52 +03:00
Ilya Kantor
9ba208f6ec minor fixes 2021-05-24 11:59:19 +03:00
Ilya Kantor
f2636ee512 minor fixes 2021-05-24 11:58:25 +03:00
Ilya Kantor
649c75873a minor fixes 2021-05-24 11:57:54 +03:00
Ilya Kantor
6cfa8b46f6 minor fixes 2021-05-24 11:57:39 +03:00
Ilya Kantor
7a30a00f00 minor fixes 2021-05-24 11:57:17 +03:00
Ilya Kantor
fc3c0714db minor fixes 2021-05-24 11:56:37 +03:00
Ilya Kantor
70bb2653e5 minor fixes 2021-05-24 11:55:27 +03:00
Ilya Kantor
842f0e22a6 minor fixes 2021-05-24 11:50:46 +03:00
Ilya Kantor
053cc055f4 minor fixes 2021-05-24 11:50:27 +03:00
Ilya Kantor
434354507c minor fixes 2021-05-24 11:44:05 +03:00
Ilya Kantor
6db496195e minor fixes 2021-05-24 11:35:52 +03:00
Ilya Kantor
3288801422 minor fixes 2021-05-24 11:35:11 +03:00
Ilya Kantor
62db4bbf70 minor fixes 2021-05-24 11:35:04 +03:00
Ilya Kantor
649a1598f5 minor fixes 2021-05-24 11:34:23 +03:00
Ilya Kantor
2fc7cb2d42 minor fixes 2021-05-24 11:33:37 +03:00
Ilya Kantor
3dbe9d13fb minor fixes 2021-05-24 11:29:27 +03:00
Ilya Kantor
1770074c5f minor fixes 2021-05-24 11:28:32 +03:00
Ilya Kantor
8871521f35 minor fixes 2021-05-24 11:28:05 +03:00
Ilya Kantor
df45aed953 minor fixes 2021-05-24 11:25:15 +03:00
Ilya Kantor
006343a653 minor fixes 2021-05-24 11:23:44 +03:00
Ilya Kantor
3e74537ea4 minor fixes 2021-05-24 11:21:44 +03:00
Ilya Kantor
94837c2e69 minor fixes 2021-05-24 11:19:58 +03:00
Ilya Kantor
a917f9c72d minor fixes 2021-05-24 11:18:20 +03:00
Ilya Kantor
ffa79a8692 minor fixes 2021-05-24 11:07:13 +03:00
Dorin David
d2ae45deef
Update article.md
Fixed typo
2021-05-20 09:08:28 +02:00
Ilya Kantor
ae8248bb56 minor fixes 2021-05-17 17:29:29 +03:00
Serhii Kulykov
ac96edec3f
Remove mentions of :host-context 2021-05-17 14:19:19 +03:00
Ilya Kantor
18a039473a minor fixes 2021-05-16 18:51:51 +03:00
Ilya Kantor
f84140232e minor fixes 2021-05-16 18:51:44 +03:00
Ilya Kantor
f598b720ad minor fixes 2021-05-16 18:43:55 +03:00
Ilya Kantor
fb09afc0fd minor fixes 2021-05-16 18:42:05 +03:00
Ilya Kantor
859fa9bedd minor fixes 2021-05-16 18:08:21 +03:00
Ilya Kantor
70049c3fdf minor fixes 2021-05-16 18:06:55 +03:00
Ilya Kantor
bad5236ed0 minor fixes 2021-05-16 18:05:30 +03:00
Ilya Kantor
89183a0b4a minor fixes 2021-05-16 18:04:28 +03:00
Osvaldo Dias dos Santos
11e08904f9 Fix typo. 2021-05-16 14:06:13 +01:00
Ilya Kantor
80956ed877 closes #2600 2021-05-16 12:01:01 +03:00
Ilya Kantor
4177be3612
Merge pull request #2602 from joaquinelio/patch-4
typo
2021-05-16 11:42:17 +03:00
joaquinelio
fafab82e8a
typo 2021-05-15 00:16:49 -03:00
Ilya Kantor
6ad89303b0 minor fixes 2021-05-13 17:53:55 +03:00
Ilya Kantor
33f1b11dc2 minor fixes 2021-05-13 17:53:06 +03:00
Ilya Kantor
237920b71e
Update article.md 2021-05-13 17:40:00 +03:00
Ilya Kantor
3bf8830f8e
Update article.md 2021-05-13 17:37:44 +03:00
Ilya Kantor
339535d450
Merge pull request #2599 from H2rmone/master
fix(classes): replace [[FunctionKind]] with [[IsClassConstructor]]
2021-05-13 16:22:40 +03:00
Ilya Kantor
094b829899
Merge pull request #2598 from joaquinelio/patch-7
always strict
2021-05-13 16:22:23 +03:00
Ilya Kantor
0cbf55dafa
Merge pull request #2595 from josecervino/patch-1
Update article.md
2021-05-13 16:12:07 +03:00
Ilya Kantor
5e9db7018c
Merge pull request #2593 from mikemitchell574/master
Replace preposition with verb
2021-05-13 13:15:48 +03:00
Ilya Kantor
57e7d67056
Merge pull request #2592 from JackStaples/patch-2
Fix grammar
2021-05-13 13:15:28 +03:00
Ilya Kantor
74d14af108 minor fixes 2021-05-13 13:13:18 +03:00
Ilya Kantor
4f0641525f closes #2583 2021-05-13 13:13:18 +03:00
Ilya Kantor
10c3bcf83d
Merge pull request #2588 from Violet-Bora-Lee/patch-3
insert empty line
2021-05-13 13:05:55 +03:00
Ilya Kantor
c78b2c9370
Merge pull request #2586 from Violet-Bora-Lee/patch-2
fix grammar
2021-05-13 13:05:48 +03:00
Ilya Kantor
055cab1ec4
Merge pull request #2585 from Violet-Bora-Lee/patch-1
Fix grammar and wrong information
2021-05-13 13:05:39 +03:00
Ilya Kantor
243a0b1fda
Merge pull request #2582 from joaquinelio/patch-4
typo it's
2021-05-13 13:03:18 +03:00
元良
5f972c8bbe fix(classes): replace [[FunctionKind]] with [[IsClassConstructor]] 2021-05-11 15:16:19 +08:00
joaquinelio
252cccf2ae
always strict 2021-05-07 19:35:54 -03:00
José Cerviño
981e34b9d5
Update article.md 2021-04-30 12:18:57 -04:00
Mike Mitchell
07b364df21 Replace preposition with verb 2021-04-29 06:12:59 -04:00
Jack Staples
8292f9c70a
Update article.md 2021-04-24 12:24:54 -07:00
Bora Lee
62bc619ea3
insert empty line 2021-04-22 21:38:47 +09:00
Bora Lee
0ad314c6a0
fix grammar 2021-04-22 18:17:19 +09:00
Bora Lee
47b1ca8df8
Fix grammar and wrong information 2021-04-21 12:51:22 +09:00
Ilya Kantor
6ab384f251
Merge pull request #2584 from joaquinelio/patch-7
typos? easier reading
2021-04-18 13:39:00 +03:00
joaquinelio
ffd8e03ecf
typos? easier reading - review pls 2021-04-18 07:31:31 -03:00
joaquinelio
7d624ef828
typo it's 2021-04-18 06:28:56 -03:00
Ilya Kantor
870a88c2f1
Merge pull request #2554 from joaquinelio/patch-5
code
2021-04-17 20:12:27 +03:00
Ilya Kantor
e8a1cd8c8a
Merge pull request #2552 from joaquinelio/patch-4
typo
2021-04-17 20:11:24 +03:00
Ilya Kantor
4b10919661
Merge pull request #2550 from hamirmahal/feat/update-readability-of-7-microtask-queue
close #2534 by slightly changing 7-microtask-queue
2021-04-17 20:08:18 +03:00
Ilya Kantor
1b4b347709
Merge pull request #2556 from joaquinelio/patch-7
typo
2021-04-17 20:05:29 +03:00
Ilya Kantor
a18c710f23
Merge pull request #2557 from joaquinelio/patch-8
repeated word
2021-04-17 20:05:18 +03:00
Ilya Kantor
ba0b184171
Merge pull request #2558 from joaquinelio/patch-9
typo
2021-04-17 20:05:07 +03:00
Ilya Kantor
8be1642b87
Merge pull request #2559 from VenkataPavan2494/patch-1
Few grammatical corrections
2021-04-17 20:04:57 +03:00
Ilya Kantor
4092b7f24b
Merge pull request #2561 from tamiolaf/patch-1
Fix grammatical error
2021-04-17 20:03:41 +03:00
Ilya Kantor
8c5d3bfea7
Merge pull request #2562 from PhilipKirner/patch-1
Grammar Fix Update in article.md
2021-04-17 20:03:29 +03:00
Ilya Kantor
4742c7b75c
Merge pull request #2565 from lumosmind/patch-8
pseudo function expression
2021-04-17 20:02:01 +03:00
Ilya Kantor
362e9a9759
Merge pull request #2566 from joaquinelio/patch-11
typos
2021-04-17 20:01:26 +03:00
Ilya Kantor
09c3914c27
Merge pull request #2568 from m4ttsch/patch-1
Fix comma splice.
2021-04-17 19:58:15 +03:00
Ilya Kantor
adb962b511 closes #2572 2021-04-17 19:55:20 +03:00
Ilya Kantor
35d1c85c7d
Merge pull request #2573 from dylan-workhub/patch-1
Fix plural typo line 414
2021-04-17 19:53:37 +03:00
Ilya Kantor
3d8ab89ddc
Merge pull request #2575 from joaquinelio/patch-13
typo
2021-04-17 19:53:00 +03:00
Ilya Kantor
2b338737d3
Merge pull request #2577 from joaquinelio/patch-14
Plunker reminder #1775
2021-04-17 15:57:25 +03:00
Ilya Kantor
d8be8b0327 Add scrollX/scrollY 2021-04-15 09:45:19 +03:00
Ilya Kantor
9e52cf3e14
Merge pull request #2578 from joaquinelio/patch-15
store vs keeps stored
2021-04-12 10:54:49 +03:00
joaquinelio
8b7bf10143
store vs keeps stored 2021-04-12 04:30:49 -03:00
joaquinelio
dbae68c452
Plunker reminder #1775 2021-04-11 04:00:11 -03:00
joaquinelio
6de9d70114
typo 2021-04-11 01:37:21 -03:00
Dylan Dixon
a2c36c946b
Fix plural typo line 414
Fixed a small typo with pluralization.
2021-04-09 20:39:27 -02:30
Matt Schlenker
b896887fe3
Fix comma splice. 2021-04-05 14:11:18 -04:00
joaquinelio
023ec22d3b
typos 2021-04-05 02:26:17 -03:00
Mustafa Kemal Tuna
334d4de8e1
pseudo function expression
it could be more intuitive. function() looks like calling a function but example is about function expression.
2021-04-04 11:47:58 +03:00
joaquinelio
b9752634f7
Update article.md 2021-04-03 18:53:16 -03:00
joaquinelio
2c1d14b98d
Update article.md 2021-04-03 18:27:28 -03:00
joaquinelio
e2558cb8df
domain cookie option 2021-04-03 17:56:04 -03:00
PhilipKirner
c722cda8d6
Update article.md
Potential Grammar Correction
2021-04-01 17:08:37 -06:00
Tami Olafunmiloye
6d0b3141a4
Fix grammatical error
The sentence should say "Why we need tests" with no question mark, or "Why do we need tests?" I think keeping the question mark makes it more personal.
2021-04-01 17:21:25 -04:00
Venkata Pavan
c06e21fee9
Few grammatical corrections
Few grammatical corrections
2021-03-31 13:30:26 +05:30
joaquinelio
01ebc30fa7
typo 2021-03-28 15:07:48 -03:00
joaquinelio
4820b978df
repeated word 2021-03-28 15:05:53 -03:00
joaquinelio
32eb2f9a86
typo 2021-03-28 15:02:25 -03:00
joaquinelio
f723253f78
transpiler def 2021-03-28 00:08:17 -03:00
joaquinelio
67230aacd1
code 2021-03-27 23:58:33 -03:00
joaquinelio
a662e1c7b2
typo 2021-03-26 23:43:52 -03:00
Hamir Mahal
a4ba2bbbce close #2534 by slightly changing 7-microtask-queue 2021-03-26 14:35:55 -07:00
Ilya Kantor
7b76185892 closes #2524 2021-03-26 09:27:02 +03:00
Ilya Kantor
b2bff50f56 closes #2525 2021-03-26 09:24:59 +03:00
Ilya Kantor
d4feed3480
Merge pull request #2527 from seamissu/patch-5
fix typo
2021-03-26 09:23:40 +03:00
Ilya Kantor
b8346a5bf7
Merge pull request #2530 from hamirmahal/infra/update-article-in-async-await
improve readability of article in chapter 8, async
2021-03-26 09:23:25 +03:00
Ilya Kantor
8e0d22659c
Merge pull request #2532 from joaquinelio/patch-4
link to deprecated v0
2021-03-26 09:22:27 +03:00
Ilya Kantor
4dcd9508d7
Merge pull request #2533 from joaquinelio/patch-5
No polyfill needed any longer
2021-03-26 09:21:47 +03:00
Ilya Kantor
d3f5a59d06 closes #2536 2021-03-26 08:38:34 +03:00
Ilya Kantor
211e13070c
Merge pull request #2537 from joaquinelio/patch-6
typo
2021-03-26 08:25:53 +03:00
Ilya Kantor
0ec6e0c086
Merge pull request #2538 from joaquinelio/patch-7
typo
2021-03-26 08:25:42 +03:00
Ilya Kantor
ebfef9f6fc
Merge pull request #2539 from joaquinelio/patch-8
typo
2021-03-26 08:25:32 +03:00
Ilya Kantor
677fb621dd
Merge pull request #2540 from joaquinelio/patch-9
typo
2021-03-26 08:25:21 +03:00
Ilya Kantor
5f875abc97
Merge pull request #2541 from LLyaudet/patch-3
2 typos
2021-03-26 08:25:11 +03:00
Ilya Kantor
0dc1961648
Merge pull request #2542 from LLyaudet/patch-4
1 typo in 06-function-object
2021-03-26 08:24:49 +03:00
Ilya Kantor
3b3f7c7eda
Merge pull request #2545 from LLyaudet/patch-6
avoid race condition in 06-advanced-functions/09-call-apply-decorator…
2021-03-26 08:14:18 +03:00
Ilya Kantor
532b64f3d4 closes #2547 2021-03-26 08:13:54 +03:00
Ilya Kantor
797c65867b
Merge pull request #2548 from joaquinelio/patch-10
typo
2021-03-26 08:05:01 +03:00
Ilya Kantor
f5583eb477
Merge pull request #2520 from shreenanda-8/master
Add missing semicolon
2021-03-26 08:04:50 +03:00
joaquinelio
3264c4bccb
typo 2021-03-25 18:07:22 -03:00
Ilya Kantor
33f8b4c4de selection improvements 2021-03-25 19:28:25 +03:00
Laurent Lyaudet
c2cbc4cdaa
avoid race condition in 06-advanced-functions/09-call-apply-decorators/04-throttle/solution.md
Well there is still a chance for a race condition but a smaller one.
We would need an atomic "if or set" for isThrottled
2021-03-24 17:27:49 +01:00
Laurent Lyaudet
8bc74f1bde
1 typo in 06-function-object
in 06-advanced-functions/06-function-object/5-sum-many-brackets/solution.md
2021-03-24 16:33:28 +01:00
Laurent Lyaudet
3855301b7f
2 typos 2021-03-24 15:53:22 +01:00
joaquinelio
a010fbc24d
typo 2021-03-23 03:56:48 -03:00
joaquinelio
d464ee94d2
typo 2021-03-23 03:54:31 -03:00
joaquinelio
081d7b2dff
typo 2021-03-23 03:39:50 -03:00
joaquinelio
cd4de4b186
typo 2021-03-23 03:23:04 -03:00
joaquinelio
027b83150e
No polyfill needed any longer 2021-03-19 16:11:20 -03:00
joaquinelio
74935beec9
link to deprecated v0 2021-03-19 16:06:49 -03:00
Hamir Mahal
065e31d0d4 improve readability of article in chapter 8, async
This mostly has readability improvements. There is one change, adding "(this is the same as (result => alert(result))" to a comment, that is solely there for clarification, to help out people learning about this for the first time.
2021-03-18 10:36:21 -07:00
seamissu
cf6be9490b
fix typo 2021-03-18 04:30:53 +11:00
Ilya Kantor
d4b3c135cc
Merge pull request #2526 from joaquinelio/patch-4
CANCEL meaning
2021-03-17 15:37:04 +03:00
joaquinelio
ff9972062a
CANCEL meaning 2021-03-17 09:32:56 -03:00
Shreenanda
51b2becd64
Add semicolon 2021-03-15 06:48:59 +05:30
Shreenanda
b96642dd20
Add semicolon 2021-03-15 06:48:10 +05:30
Ilya Kantor
e01998baf8 minor fixes 2021-03-14 09:52:00 +03:00
Ilya Kantor
bbf60dd340 minor fixes 2021-03-13 23:21:10 +03:00
Ilya Kantor
7ad529e27d
Merge pull request #2464 from VibingCreator/master
Unify content with cosmetic changes
2021-03-13 18:32:54 +03:00
Ilya Kantor
8bc505adcd closes #2459 2021-03-13 18:30:06 +03:00
Ilya Kantor
175574e261
Merge pull request #2440 from Zearin/patch-1
Update article.md
2021-03-13 18:20:14 +03:00
Ilya Kantor
c3a9bbdf49 minor fixes 2021-03-13 15:57:12 +03:00
Ilya Kantor
e4c769d17b
Merge pull request #2489 from mikitachyzhyk/patch-1
Considering Promise.any there are 6 static methods
2021-03-13 10:12:49 +03:00
Ilya Kantor
78f7678882 closes #2494 2021-03-13 10:12:32 +03:00
Ilya Kantor
91aed383d9 minor fixes 2021-03-13 10:08:29 +03:00
Ilya Kantor
a89de3548d closes #2498 2021-03-13 09:38:06 +03:00
Ilya Kantor
bf66ad6a82
Merge pull request #2511 from lumosmind/patch-6
spread operator vs spread syntax
2021-03-13 01:43:17 +03:00
Ilya Kantor
e0f41ea41b
Merge pull request #2509 from T1mL3arn/patch-1
Fix little formatting typo in 1.2.13 (loops)
2021-03-13 01:43:06 +03:00
Ilya Kantor
7ec4f287ae
Merge pull request #2507 from joaquinelio/patch-1
typo
2021-03-13 01:38:40 +03:00
Ilya Kantor
f267fad6e0
Merge pull request #2504 from fibretothepremises/patch-2
Update article.md - fix syntax
2021-03-13 01:36:05 +03:00
Ilya Kantor
20fd4f8a70
Merge pull request #2496 from knoxj1/master
Add comments to article.md
2021-03-13 01:23:58 +03:00
Ilya Kantor
e6bf25f6b3
Merge pull request #2495 from joaquinelio/info
needed 4 translated repos
2021-03-13 01:23:34 +03:00
Mustafa Kemal Tuna
d9d1023281
spread operator vs spread syntax
it should be spread syntax 
https://javascript.info/rest-parameters-spread
2021-03-08 15:43:00 +03:00
Timur
fdcf507c1c
Fix little formatting typo in 1.2.13 (loops) 2021-03-05 12:50:25 +10:00
joaquinelio
f452810885
typo 2021-03-02 10:28:52 -03:00
Ilya Kantor
f6ae0b5a5f minor fixes 2021-02-28 22:24:46 +03:00
fibretothepremises
879554f082
Update article.md - fix syntax
Fix syntax
2021-02-25 09:48:46 +11:00
Knox Jarvis
dd9833ccec
Update 2-ui/4-forms-controls/1-form-elements/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2021-02-10 10:34:10 -05:00
Knox Jarvis
ff9e2e2635
Merge pull request #1 from knoxj1/knoxj1-patch-1
Add comments to article.md
2021-02-04 18:25:59 -05:00
Knox Jarvis
c8a52a182b
Add comments to article.md
I do not think it's likely but I do not want anyone to mistake those lines for legitimate JS expressions. I modified those two lines to match the format of pretty much every other comment in the article.
2021-02-04 18:24:48 -05:00
joaquinelio
0d52720bc0 needed 4 translated repos 2021-02-04 11:49:03 -03:00
Zearin
f0145341c2
Remove comma after e.g. based on feedback 2021-02-02 12:49:33 -05:00
Ilya Kantor
7533c719fb minor fixes 2021-02-02 16:56:39 +03:00
Mikita Chyzhyk
7be7b28a97
Considering Promise.any there are 6 static methods 2021-02-02 14:13:12 +03:00
Ilya Kantor
58c9aae07f
Merge pull request #2463 from lijunkang12/patch-1
Update task.md
2021-02-02 11:46:39 +03:00
Ilya Kantor
1c24978bd7
Merge pull request #2470 from helloimjordan/patch-1
Fix article typo
2021-02-02 11:43:46 +03:00
Ilya Kantor
3fa4c32e1d minor fixes 2021-02-02 11:43:35 +03:00
Ilya Kantor
19bf2d3f5a
Merge pull request #2469 from fibretothepremises/patch-1
fix word
2021-02-02 11:38:22 +03:00
Ilya Kantor
0f00709fbf
Merge pull request #2475 from pawel-123/patch-1
Fix typo in "liseners" on line 21
2021-02-02 11:17:26 +03:00
Ilya Kantor
5a9f6c4053
Merge pull request #2476 from seamissu/patch-3
fix typo: missing semicolon after let ladder = { }
2021-02-02 11:17:11 +03:00
Ilya Kantor
355c2e3570
Merge pull request #2466 from aliaghdam/master
fix undefined to pass test
2021-02-02 11:07:50 +03:00
Ilya Kantor
0806399c51 minor fixes 2021-02-02 10:37:28 +03:00
Ilya Kantor
0c8a4fe995
Merge pull request #2482 from lumosmind/patch-3
there are four logical operators in JS
2021-02-02 10:36:35 +03:00
Ilya Kantor
23674dd7f1
Merge pull request #2483 from f6p/create-vs-inner-grammar
Improve modyfying document task one sentence grammar
2021-02-02 10:32:55 +03:00
Ilya Kantor
f3dc5d1174
Merge pull request #2484 from MuhammedZakir/patch-1
Add missing semicolon in Arrow Functions (1-6-12)
2021-02-02 10:32:44 +03:00
Ilya Kantor
ebd0d110df
Merge pull request #2485 from notapatch/pr-call-apply-decorators-clearer-comments
Clearer CachingDecorator comments
2021-02-02 10:32:33 +03:00
Ilya Kantor
a5523ad287
Merge pull request #2486 from asamant/asamant-patch-1
Update article.md
2021-02-02 10:31:20 +03:00
Ilya Kantor
e825d256a5
Merge pull request #2487 from lumosmind/patch-4
conflict with "rest syntax"
2021-02-02 10:31:05 +03:00
Mustafa Kemal Tuna
005204e107
conflict with "rest syntax"
I think argN represents count of arbitrary parameters. But this syntax looks like "rest syntax". It could be more understandable to change it like this.
2021-02-02 07:03:39 +03:00
Aniket Samant
96e95bb3d1
Update article.md
A minor addition. (...where such thing doesn't happen. --> where such a thing doesn't happen.)
2021-02-02 03:47:59 +05:30
Richard
18534d3abd Clearer CachingDecorator comments
- comments are in pairs. The first of the pair talks about what
   happened "caching" and the second pair talks about what was
   alerted "the same". This is confusing.
 - changed comment so both lines tell the reader what happened
   and what result was returned.
2021-02-01 18:08:34 +00:00
Muhammed Zakir
4df24f3a08
Add missing semicolon in Arrow Functions (1-6-12) 2021-02-01 21:42:48 +05:30
Filip Pyda
21d444fcb5 Add will to modyfying document task 1 sentence 2021-02-01 09:32:46 +01:00
Mustafa Kemal Tuna
82e4e212f4
there are four logical operators in JS
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator
2021-02-01 11:11:35 +03:00
seamissu
526b216871
fix typo: missing semicolon after let ladder = { } 2021-01-30 04:26:38 +11:00
Pawel
3f8ab2426d
Fix typo in "liseners" on line 21 2021-01-29 12:32:39 +01:00
Jordan Cates
1246f79ca2
Fix article typo
remove unnecessary 'in'
2021-01-27 17:22:26 -08:00
fibretothepremises
936bea24bc
fix word
fix word "when" to "than".
2021-01-27 17:39:35 +11:00
Zearin
4711ee4e85
Update article.md 2021-01-25 11:03:51 -05:00
Zearin
d78ce9ca32
Update article.md 2021-01-25 11:01:01 -05:00
Zearin
b93be7398a
Update article.md 2021-01-25 10:55:45 -05:00
Ali Aghdam
6975a01941 fix undefined to pass test 2021-01-25 14:54:10 +03:30
VibingCreator
ad012798ea restore try-catch-flow.svg 2021-01-25 01:34:29 +01:00
VibingCreator
93b1051687 unify content with cosmetic changes 2021-01-25 01:30:00 +01:00
Junkang Li
aef2a02f42
Update task.md
To be coherent with the solution and the picture below.
2021-01-23 16:42:55 +01:00
Ilya Kantor
97ef86242f
Merge pull request #2462 from AmosChenYQ/amoschen-classes-correct
modify alternative method in comment of mixins' code example
2021-01-23 09:27:59 +03:00
AmosChenYQ
13a6a7586c modify alternative method in comment of mixins' code example 2021-01-23 11:44:43 +08:00
Ilya Kantor
7bd55a44a1
Merge pull request #2458 from martynov-94/patch-2
typo
2021-01-22 08:17:37 +03:00
Ilya Kantor
f0d389e73f
Merge pull request #2457 from martynov-94/patch-3
to both -> both to
2021-01-22 08:17:19 +03:00
martynov-94
21a751ab0e
to both -> both to
In the original it's read as if there is two rabbit methods, instead of "both to... and also to..."
2021-01-22 08:11:54 +03:00
Ilya Kantor
b462bdd1d3
Merge pull request #2443 from emek/minor-text-fix
Fix mismatched alert text
2021-01-21 22:52:29 +03:00
Ilya Kantor
354c633803
Merge pull request #2445 from msisaifu/fix-typo
fix typo
2021-01-21 22:52:20 +03:00
Ilya Kantor
0c4913c367 minor fixes 2021-01-21 22:51:55 +03:00
Ilya Kantor
29827e8009
Merge pull request #2447 from joaquinelio/patch-1
too wordy explanation
2021-01-21 22:51:16 +03:00
Ilya Kantor
6e326fbf97
Merge pull request #2449 from redrambles/patch-2
Update article.md
2021-01-21 22:50:06 +03:00
Ilya Kantor
acf62b0d03 minor fixes 2021-01-21 22:49:27 +03:00
Ilya Kantor
ab7b6469ab
Merge pull request #2453 from bierlingm/patch-1
Spelling error & wrong idiom
2021-01-21 22:47:31 +03:00
Moritz Bierling
6451000639
Spelling error & wrong idiom
Spelling error: 'out'-->'our'

Idiom: 'From the other hand'-->"On the other hand"
2021-01-21 16:49:06 +01:00
martynov-94
0deca2cb91
typo
wrong order of words
2021-01-21 18:30:50 +03:00
Ann Cascarano
04e2514dc8
Update article.md
Missing word / small fix.
2021-01-20 10:26:26 -05:00
joaquinelio
bdb19f681e
too wordy explanation 2021-01-17 20:00:35 -03:00
Saiful
0f65c3986f the type name is lookbehind instead of lookahead 2021-01-17 18:08:55 +06:00
Saiful
37c906ca56 fix typo 2021-01-17 10:20:15 +06:00
Zearin
8806d5b8ec
Update article.md
Rewrote phrasing pointed out in feedback
2021-01-16 16:40:46 -05:00
Zearin
18417c349d
Update article.md
Edited according to feedback
2021-01-16 16:35:37 -05:00
Emek Türkeli
9e1d5315ad Fix mismatched alert text 2021-01-16 19:39:08 +03:00
Ilya Kantor
3a0b3f4e31
Merge pull request #2430 from joaquinelio/patch-1
"exception" vs "new feature" ?
2021-01-16 10:28:00 +03:00
Zearin
bda37e2b7b
Update article.md
Minor edits for grammar, phrasing, and markup.
2021-01-15 12:14:53 -05:00
Ilya Kantor
f797858498 closes #2398 2021-01-14 11:23:29 +03:00
Ilya Kantor
8eb6f97000 minor fixes 2021-01-13 23:44:22 +03:00
Ilya Kantor
99b2a0928f
Merge pull request #2437 from lumosmind/patch-68
typo
2021-01-13 21:31:54 +03:00
Ilya Kantor
9c082c82fd minor fixes 2021-01-13 21:31:15 +03:00
Mustafa Kemal Tuna
e95ca4b663
typo 2021-01-13 21:29:13 +03:00
Ilya Kantor
15e6f2da5b minor fixes 2021-01-13 21:20:50 +03:00
Ilya Kantor
4307531f03 Merge branch 'master' of github.com:javascript-tutorial/en.javascript.info 2021-01-13 20:01:23 +03:00
Ilya Kantor
bc8b37bafc minor fixes 2021-01-13 20:01:03 +03:00
Ilya Kantor
f6d3e300ca
Merge pull request #2429 from lumosmind/patch-61
each unit parts must be tested
2021-01-13 19:57:43 +03:00
Ilya Kantor
9c1a0fda22
Merge pull request #2431 from bilalbutt044/patch-1
Update article.md
2021-01-13 19:56:10 +03:00
Ilya Kantor
003d602069
Merge pull request #2432 from lumosmind/patch-62
individual test case for methods
2021-01-13 19:55:35 +03:00
Ilya Kantor
58e64562bb minor fixes 2021-01-13 19:54:44 +03:00
Ilya Kantor
c7d30726a2 closes #2433 2021-01-13 19:53:38 +03:00
Ilya Kantor
3c673ac64f
Merge pull request #2434 from lumosmind/patch-65
no need to "js run"
2021-01-13 19:52:04 +03:00
Ilya Kantor
09ec05c1d9 minor fixes 2021-01-13 19:49:09 +03:00
Mustafa Kemal Tuna
85fe7b8e5a
no need to "js run"
there is nothing to see when code is run. So run button for code can create some confusion.
2021-01-13 03:02:57 +03:00
Mustafa Kemal Tuna
09f8ca8659
individual test case for methods
to ensure completeness, every method should have their own individual test case.
2021-01-12 23:17:01 +03:00
Muhammad Bilal
73fd173f99
Update article.md
fix spelling of `further`
2021-01-12 23:16:01 +05:00
joaquinelio
a27b7e2310
"exception" vs "new feature" ? 2021-01-12 08:28:05 -03:00
Ilya Kantor
eb3b360dc3 minor fixes 2021-01-12 11:11:40 +03:00
Mustafa Kemal Tuna
afd41eaf86
each unit parts must be tested
For completeness of the test cases we could add tests for the read method. So every method can have individual test cases.
2021-01-12 05:22:25 +03:00
Ilya Kantor
b9d5335b1d
Merge pull request #2425 from sarscode/sarscode-constructor-new-target
new.target is undefined not empty
2021-01-11 15:12:37 +03:00
Sani Rich
6b296c1770
new.target is undefined not empty
It is should be made know that `new.target` is `undefined` for regular function calls than say it is empty.
2021-01-11 13:09:58 +01:00
Ilya Kantor
468e355288
Merge pull request #2423 from lumosmind/patch-56
parameters are also local variables
2021-01-10 15:51:26 +03:00
Ilya Kantor
86a60219fb minor fixes 2021-01-10 15:50:14 +03:00
Mustafa Kemal Tuna
6a432df33b
parameters are also local variables
We can declare local variables and give them initial values in parameter list of function definition. So we have another way to create local variables.
2021-01-10 00:01:17 +03:00
Ilya Kantor
2027939238 minor fixes 2021-01-09 17:29:25 +03:00
Ilya Kantor
6113f338e5
Merge pull request #2422 from lapstjup/patch-1
Update currying function to use bind instead of wrapper pass
2021-01-09 17:16:36 +03:00
Ilya Kantor
12b23c74d9
Merge pull request #2417 from lumosmind/patch-55
all operators must return a value
2021-01-09 15:41:26 +03:00
Ilya Kantor
930485ba05
Merge pull request #2419 from TaylorClay/patch-1
Minor output typo
2021-01-09 15:41:05 +03:00
Ilya Kantor
18a60ab7a9
Merge pull request #2420 from martynov-94/patch-1
Update article.md
2021-01-09 15:40:55 +03:00
Ilya Kantor
3b7d493404 closes #2421 2021-01-09 15:39:22 +03:00
Lakshya Thakur
997f392f74
Add the (2) point reference 2021-01-09 17:40:25 +05:30
Lakshya Thakur
5965ae79a8
Update currying function to use bind instead of wrapper pass
I think this change will help us to dodge concatenating new arguments with lexical ones and make the currying function much simpler.
2021-01-09 17:00:00 +05:30
martynov-94
2229a48957
Update article.md
One redundant 'here' here
2021-01-08 09:59:17 +03:00
Taylor Clay
a2561dc123
Minor output typo
In the section describing the usage of `"super"`, example output says `// White Rabbit stands still. White rabbit hides!`

The `name` member in this example is set to `White Rabbit`, so the second sentence above should say `White Rabbit hides!` (capital R)
2021-01-07 16:37:44 -06:00
Mustafa Kemal Tuna
80c490153a
all operators must return a value
All operators should return a value because of the definition of the term 'operator'. 
I could not find an operator as an exception which doesn't return a value.
Do you?
2021-01-07 12:09:31 +03:00
Ilya Kantor
32518b7e76 minor 2021-01-07 06:33:40 +03:00
Ilya Kantor
c3505142e9 minor 2021-01-07 06:13:38 +03:00
Ilya Kantor
42ee1488af
Merge pull request #2395 from RapTho/patch-8
Reformulations
2021-01-05 00:57:10 +03:00
Ilya Kantor
51f3915141
Merge pull request #2390 from RapTho/patch-5
small reformulation
2021-01-05 00:56:44 +03:00
Ilya Kantor
c67f8b8af9
Merge pull request #2388 from RapTho/patch-4
small reformulations
2021-01-05 00:56:06 +03:00
Ilya Kantor
e730c5af43
Merge pull request #2416 from joaquinelio/patch-1
kotlin 404
2021-01-05 00:55:25 +03:00
joaquinelio
16ac39718c
kotlin 404 2021-01-04 06:09:50 -03:00
Ilya Kantor
039716de8a
Merge pull request #2389 from Danziger/patch-1
Add information about virtual/mobile keyboards and an additional keyboard event inspection tool.
2021-01-03 13:31:41 +03:00
Dani Gámez Franco
04b1313922
Remove keyjs.dev link under the key codes inspection snippet. 2021-01-03 11:21:28 +01:00
Raphael Tholl
03b6d86272
Edit based on feedback iliakan 2021-01-02 18:57:18 +01:00
Raphael Tholl
bcbb5d52e9
Edit based on feedback iliakan 2021-01-02 18:54:05 +01:00
Raphael Tholl
b9481da27f
Edits based on feedback iliakan 2021-01-02 18:47:47 +01:00
Ilya Kantor
4a0da595aa
Merge pull request #2414 from LLyaudet/patch-2
Update article.md
2020-12-31 21:51:24 +03:00
Ilya Kantor
98de4f41bf
Merge pull request #2386 from RapTho/patch-2
Typos + rephrasing
2020-12-31 21:50:34 +03:00
Ilya Kantor
02089cf87a
Merge pull request #2393 from tokou/patch-1
Add link to Kotlin/JS
2020-12-31 18:48:16 +03:00
Laurent Lyaudet
cc593c6414
Update article.md
typos : raised *to* the given power, dots after comment (one of the three function comments already had the dot at the end)
2020-12-31 15:54:21 +01:00
Ilya Kantor
1fa08bc754
Merge pull request #2404 from imaverage/patch-1
Update article.md
2020-12-31 15:13:42 +03:00
Ilya Kantor
b0aa994aa9
Merge pull request #2400 from wolfter12/fixed-small-typos
fixed small typos
2020-12-31 15:13:33 +03:00
Ilya Kantor
b7d28200a0
Merge pull request #2391 from RapTho/patch-6
Fixed small typos
2020-12-31 15:06:34 +03:00
Ilya Kantor
1404669cae
Merge pull request #2406 from Georgy-Losenkov/patch-1
Update article.md
2020-12-31 14:46:02 +03:00
Ilya Kantor
2754e03de2 closes #2410 2020-12-31 14:45:19 +03:00
Ilya Kantor
6418344d59 closes #2411 2020-12-31 14:42:56 +03:00
Ilya Kantor
701392c36a
Merge pull request #2413 from raycon/master
Change source of the term 'microtask'
2020-12-31 14:40:32 +03:00
Raegon Kim
83b051e2b2
Change source of the term 'microtask' 2020-12-31 15:45:40 +09:00
Georgy Losenkov
33e25dce1e
Update article.md
Fixed wording since "may not" means "prohibited"
2020-12-25 08:23:53 +07:00
imaverage
cbdc268b4e
Update article.md 2020-12-24 07:38:52 -06:00
Ilya Kantor
13da056653 closes #2401 2020-12-22 11:41:58 +03:00
Nazar
f3555ee990 fixed small typos 2020-12-20 15:00:41 +02:00
Ilya Kantor
fc3f811c03
Merge pull request #2399 from joaquinelio/patch-2
Give me five
2020-12-20 09:43:20 +03:00
joaquinelio
5a14316d8a
Update article.md 2020-12-19 22:40:31 -03:00
joaquinelio
1af33d1905
Give me five 2020-12-19 22:29:38 -03:00
Raphael Tholl
0427ecb14a
Reformulations 2020-12-17 12:05:54 +01:00
Tarek Belkahia
3a21dce11e
Add link to Kotlin/JS 2020-12-16 15:44:26 +01:00
Ilya Kantor
a43c18ff18 minor fixes 2020-12-15 20:17:19 +03:00
Raphael Tholl
9a84c51792
Fixed small typos 2020-12-14 23:09:57 +01:00
Raphael
dfa5ec9b60
small reformulation 2020-12-14 20:40:32 +01:00
Dani Gámez Franco
9f2d2005a4
Update 2-ui/3-event-details/7-keyboard-events/article.md
Co-authored-by: Vse Mozhe Buty <vsemozhetbyt@gmail.com>
2020-12-14 19:20:03 +01:00
Raphael
7a7b25a943
small rephrasings 2020-12-14 16:19:18 +01:00
Ilya Kantor
2b79ab1ff8 minor fixes 2020-12-14 17:34:52 +03:00
Raphael
7b213467d4
Typos + rephrasing 2020-12-14 14:26:51 +01:00
Ilya Kantor
23e85b3c33
Merge pull request #2385 from heypano/patch-1
Typo "in any *of* language"
2020-12-13 23:14:30 +03:00
Pano Papadatos
37e51e0d13
Typo "in any *of* language" 2020-12-13 13:35:25 -05:00
Ilya Kantor
c275ba48b6 closes #2382 2020-12-13 21:17:05 +03:00
Ilya Kantor
8bc2e921eb minor fixes 2020-12-13 20:35:12 +03:00
Ilya Kantor
9b68941a44
Merge pull request #2366 from odsantos/fix-polyfills-typo
Fix "polyfills" typo
2020-12-13 20:29:19 +03:00
Ilya Kantor
fd2e83c6a3
Merge pull request #2368 from vsemozhetbyt/patch-1
Fix confusing wording in 9.6 (Word boundary: \b)
2020-12-13 20:29:03 +03:00
Ilya Kantor
0543fee98d
Merge pull request #2369 from vsemozhetbyt/patch-3
Fix typo in 9.7 (Escaping, special characters)
2020-12-13 20:28:47 +03:00
Ilya Kantor
76f07329c6
Merge pull request #2370 from vsemozhetbyt/patch-4
Fix typo in 9.8 task solution (Sets and ranges [...])
2020-12-13 20:28:35 +03:00
Ilya Kantor
985dedbefd
Merge pull request #2371 from vsemozhetbyt/patch-5
Update support note in 9.8 (Sets and ranges [...])
2020-12-13 20:28:22 +03:00
Ilya Kantor
a1736bd757
Merge pull request #2372 from vsemozhetbyt/9.10
Fix typos in 9.10 (Greedy and lazy quantifiers)
2020-12-13 20:27:24 +03:00
Ilya Kantor
e1cb0f8690
Merge pull request #2373 from vsemozhetbyt/9.11
Fix typos in 9.11 (Capturing groups)
2020-12-13 20:24:53 +03:00
Ilya Kantor
aae708dacc
Merge pull request #2374 from vsemozhetbyt/patch-6
Fix typos in 9.13 (Alternation (OR) |)
2020-12-13 20:24:22 +03:00
Ilya Kantor
093dfe4c6f
Merge pull request #2375 from vsemozhetbyt/patch-7
Correct example in 9.14 (Lookahead and lookbehind)
2020-12-13 20:23:33 +03:00
Ilya Kantor
c59c9e8172
Merge pull request #2376 from vsemozhetbyt/patch-8
Make solution in 9.14 safer
2020-12-13 20:21:27 +03:00
Ilya Kantor
6fee9f07d2
Merge pull request #2377 from jasonvitagendev/master
Fix typo in 1.99.1 (Proxy and Reflect)
2020-12-13 20:17:09 +03:00
Ilya Kantor
4e1ab89ea0
Merge pull request #2378 from vsemozhetbyt/patch-9
Fix typo, clarify wording in 9.15 (Catastrophic backtracking)
2020-12-13 20:16:55 +03:00
Ilya Kantor
f716a917bc minor fixes 2020-12-13 20:16:17 +03:00
Ilya Kantor
27c30303fa minor fixes 2020-12-13 20:15:24 +03:00
Ilya Kantor
19d1e33263
Merge pull request #2379 from vsemozhetbyt/patch-10
Update support note in 9.15 (Catastrophic backtracking)
2020-12-13 20:10:08 +03:00
Ilya Kantor
16fda1bed2
Merge pull request #2381 from vsemozhetbyt/patch-11
Fix typo in 9.16 (Sticky flag "y"...)
2020-12-13 20:08:35 +03:00
Ilya Kantor
92cdba0a00
Merge pull request #2383 from vsemozhetbyt/patch-12
Fix typo in 9.17 (Methods of RegExp and String)
2020-12-13 20:08:22 +03:00
Ilya Kantor
94c829eba6
Merge pull request #2384 from RapTho/master
Typos in Part 2, 2.5 and Part 3, 3.2
2020-12-13 20:08:09 +03:00
Ilya Kantor
ba5ebbc5f6
Merge pull request #2363 from vsemozhetbyt/patch-2
Fix some issues in 9.2 (Character classes)
2020-12-13 20:07:53 +03:00
Raphael
eb5e7da359
Fixed typo 2020-12-13 12:33:00 +01:00
Vse Mozhe Buty
a8c22e92e6
Fix typo in 9.17 (Methods of RegExp and String) 2020-12-11 00:40:16 +02:00
Vse Mozhe Buty
04ce7283ad
Fix typo in 9.16 (Sticky flag "y"...) 2020-12-10 20:42:09 +02:00
Vse Mozhe Buty
4512a02fd0 Update support note in 9.15 (Catastrophic backtracking)
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=10765
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=11021

Can be tested in the Goole Chrome Beta, Dev, and Canary branches now,
as well as in the Node.js v8-canary branch.
2020-12-10 17:01:43 +02:00
Vse Mozhe Buty
e5d1c02628
Fix typo, clarify wording in 9.15 (Catastrophic backtracking) 2020-12-10 16:00:34 +02:00
jason
ec15bd2950 Fix typo in 1.99.1 (Proxy and Reflect) 2020-12-10 14:29:53 +08:00
Vse Mozhe Buty
20916d9dc7 Make solution in 9.14 safer
As the task uses multiline HTML
and the note at the end suggests using `s` flag,
the lazy quantifier would be safer.
2020-12-10 00:23:16 +02:00
Vse Mozhe Buty
6fc5b2c555 Correct example in 9.14 (Lookahead and lookbehind)
Without the `g` flag, we cannot say that the price is skipped.
Without the `\b` assertion, we will have the part of the price in the result.
2020-12-09 23:40:16 +02:00
Vse Mozhe Buty
276f48de2b
Fix typos in 9.13 (Alternation (OR) |) 2020-12-09 21:19:50 +02:00
Vse Mozhe Buty
f2f650062c Fix typos in 9.11 (Capturing groups) 2020-12-09 18:54:47 +02:00
Vse Mozhe Buty
656700966b Fix typos in 9.10 (Greedy and lazy quantifiers) 2020-12-09 01:45:06 +02:00
Vse Mozhe Buty
b19312e8ca
Update support note in 9.8 (Sets and ranges [...])
See https://caniuse.com/mdn-javascript_builtins_regexp_property_escapes
2020-12-08 17:41:33 +02:00
Vse Mozhe Buty
4a3d842bc6
Fix typo in 9.8 task solution (Sets and ranges [...]) 2020-12-08 17:38:02 +02:00
Vse Mozhe Buty
935ed8580e
Fix typo in 9.7 (Escaping, special characters) 2020-12-08 00:03:41 +02:00
Vse Mozhe Buty
6a61c04fc5
Fix confusing wording in 9.6 (Word boundary: \b)
`\bHello\b` pattern was just analyzed in the previous paragraph,
so the current wording is a bit confusing.
2020-12-07 22:54:54 +02:00
Osvaldo Dias dos Santos
907e6c8335 Fix "polyfills" typo 2020-12-07 17:12:39 +01:00
Ilya Kantor
633db6fbe9
Merge pull request #2364 from vsemozhetbyt/unicode
Replace unicode with Unicode all over the book
2020-12-07 19:10:47 +03:00
Vse Mozhe Buty
7c73f64a13 Replace unicode with Unicode all over the book 2020-12-07 18:05:47 +02:00
Vse Mozhe Buty
2cf95d82ba Fix some issues in 9.2 (Character classes)
* Fix typos.
* Update a support note.
* Add a reference for a yet unexplained pattern.
2020-12-07 17:47:03 +02:00
Ilya Kantor
e87f130fc1
Merge pull request #2362 from vsemozhetbyt/patch-1
Fix typo in 9.1 (Patterns and flags)
2020-12-07 18:37:44 +03:00
Vse Mozhe Buty
5be2c046a5
Fix typo in 9.1 (Patterns and flags) 2020-12-07 17:25:36 +02:00
Raphael
adab443ae3
Fixed small typo
2-ui / 2-events / 5-dispatch-events

In subchapter "Event constructor": first word use "Built-in" instead of "Build-in"
2020-12-07 15:30:26 +01:00
Ilya Kantor
79c9513796 closes #2358 2020-12-07 17:20:12 +03:00
Ilya Kantor
0936245a87
Merge pull request #2341 from vsoni101/patch-1
Update article.md in section 2.8
2020-12-07 17:15:24 +03:00
Ilya Kantor
1e4b9e43e4
Merge pull request #2359 from vsemozhetbyt/patch-1
Fix typo in 8.5 (Shadow DOM slots...)
2020-12-07 17:14:38 +03:00
Vse Mozhe Buty
76b42c3189
Fix typo in 8.5 (Shadow DOM slots...) 2020-12-06 22:08:01 +02:00
Ilya Kantor
c56e6a57ac
Merge pull request #2357 from vsemozhetbyt/patch-1
Sync examples from 2 commits in 8.5 (Shadow DOM slots...)
2020-12-06 19:40:33 +03:00
Vse Mozhe Buty
59a579f566
Sync examples from 2 commits in 8.5 (Shadow DOM slots...) 2020-12-06 18:30:45 +02:00
Ilya Kantor
68dfa95daa minor fixes 2020-12-06 17:36:59 +03:00
Ilya Kantor
f30b4f2f7d
Merge pull request #2356 from vsemozhetbyt/patch-1
Fix possible typos in 1.3.6 (Polyfills and transpilers)
2020-12-06 17:36:02 +03:00
Vse Mozhe Buty
eb81e529be
Fix possible typos in 1.3.6 (Polyfills and transpilers) 2020-12-06 16:26:39 +02:00
Ilya Kantor
433ef6d333
Merge pull request #2355 from vsemozhetbyt/patch-1
Fix typo in 8.3 (Shadow DOM)
2020-12-06 15:14:57 +03:00
Vse Mozhe Buty
e194ec2e22
Fix typo in 8.3 (Shadow DOM) 2020-12-06 14:13:54 +02:00
Ilya Kantor
bb5c89a701
Merge pull request #2354 from vsemozhetbyt/patch-1
Fix typo in 8.2 (Custom elements)
2020-12-06 11:54:50 +03:00
Ilya Kantor
e8d29cb49b closes #2173 2020-12-06 11:54:22 +03:00
Vse Mozhe Buty
b55c226879
Fix typo in 8.2 (Custom elements) 2020-12-05 23:29:14 +02:00
Ilya Kantor
211e20992e closes #2225 2020-12-05 23:09:36 +03:00
Ilya Kantor
0585eda755 closes #2248 2020-12-05 23:06:01 +03:00
Ilya Kantor
ec4dcb279a closes #2353 2020-12-05 23:02:20 +03:00
Ilya Kantor
63d0f055fc closes #2244 2020-12-05 22:30:51 +03:00
Ilya Kantor
6daaaa224f
Update article.md 2020-12-05 22:16:42 +03:00
Ilya Kantor
08cc593cab minor fixes 2020-12-05 20:46:46 +03:00
Ilya Kantor
a964025a5d closes #2317 2020-12-05 20:41:32 +03:00
Ilya Kantor
75a56dac98 fixes #2318 2020-12-05 19:54:51 +03:00
Ilya Kantor
6d9ab125f0 fixes #2333 2020-12-05 19:51:58 +03:00
Ilya Kantor
5ce6ce975e minor fixes 2020-12-05 19:50:31 +03:00
Ilya Kantor
2741d5e7d8
Merge pull request #2340 from vsemozhetbyt/patch-8
Fix possible typos in 6.3 (IndexedDB)
2020-12-05 19:42:03 +03:00
Ilya Kantor
d319026a14
Merge pull request #2338 from FantasqueX/patch-1
fix typo in 1.5 (08-weakmap-weakset)
2020-12-05 19:41:28 +03:00
Ilya Kantor
0db83b2858
Merge branch 'master' into patch-1 2020-12-05 19:41:19 +03:00
Ilya Kantor
59acd01bb3
Merge pull request #2337 from vsemozhetbyt/patch-7
Fix typo in 6.2 (LocalStorage, sessionStorage)
2020-12-05 19:40:52 +03:00
Ilya Kantor
ad1df4e551
Merge pull request #2336 from vsemozhetbyt/patch-6
Fix possible typos in 6.1 (Cookies, document.cookie)
2020-12-05 19:40:38 +03:00
Ilya Kantor
762162fab5
Merge pull request #2334 from joneskj55/patch-1
Fix for issue #2314
2020-12-05 19:40:11 +03:00
Ilya Kantor
528b7c59ca
Merge pull request #2332 from vsemozhetbyt/patch-5
Fix typo and ambiguity in 5.12 (Server Sent Events)
2020-12-05 19:39:58 +03:00
Ilya Kantor
b563d4d08c
Merge pull request #2331 from vsemozhetbyt/patch-4
Fix typos in 1.5.8 (WeakMap and WeakSet)
2020-12-05 19:39:39 +03:00
Ilya Kantor
38407b17b0
Merge pull request #2351 from vsemozhetbyt/7.3
Fix typos in 7.3 (JavaScript animations)
2020-12-05 19:39:08 +03:00
Ilya Kantor
386870dd50 minor fixes 2020-12-05 19:38:24 +03:00
Ilya Kantor
75302a601e
Merge pull request #2330 from vsemozhetbyt/patch-3
Fix typo, add info in 1.11.5 (Promise API)
2020-12-05 19:29:51 +03:00
Ilya Kantor
9fab25a7a2
Merge pull request #2329 from vsemozhetbyt/patch-2
Fix typo in 1.99.1 (Proxy and Reflect)
2020-12-05 19:29:26 +03:00
Vse Mozhe Buty
441e720c04 Fix typo in 6.2 (LocalStorage, sessionStorage) 2020-12-05 17:59:14 +02:00
Vse Mozhe Buty
3d4a6e9223 Fix typos in 7.3 (JavaScript animations) 2020-12-05 17:56:33 +02:00
Ilya Kantor
ff40f490ac
Merge pull request #2342 from vsemozhetbyt/patch-10
Fix typo in 7.1 (Bezier curve)
2020-12-05 18:46:57 +03:00
Ilya Kantor
b65c62588e
Merge pull request #2343 from vsemozhetbyt/patch-11
Fix typo in 7.2 (CSS-animations)
2020-12-05 18:46:45 +03:00
Ilya Kantor
f274f4d1f9
Merge pull request #2347 from PGlivicky/fix-clock-setinterval-solution
Fix bug in the 'colored clock with setInterval' task's solution
2020-12-05 18:07:08 +03:00
Ilya Kantor
e112b8bc16
Merge pull request #2349 from odsantos/fix-arrays-typos
Fix typo.
2020-12-05 18:04:37 +03:00
Ilya Kantor
44f4795a4c selection 2020-12-05 18:04:00 +03:00
Osvaldo Dias dos Santos
268159c139 Fix typo. 2020-12-05 00:04:46 +01:00
Petr Glivicky
6118cc0878 Add a missing bracket in the solution description 2020-12-04 21:13:51 +01:00
Petr Glivicky
d4c23dcf37 Fix bug: Clock can't be stopped when 'Start' clicked while running 2020-12-04 20:40:01 +01:00
Vse Mozhe Buty
09281788bf
Fix typo in 7.2 (CSS-animations) 2020-12-04 00:00:44 +02:00
Vaibhav Soni
3d86152fdd
Update article.md
Fix some quotes for consistency with above paragraphs
2020-12-03 18:51:18 +00:00
Vaibhav Soni
634e066841
Update 1-js/02-first-steps/08-operators/article.md
Co-authored-by: Vse Mozhe Buty <vsemozhetbyt@gmail.com>
2020-12-03 15:21:13 +00:00
Vse Mozhe Buty
21dc1384cf
Fix typo in 7.1 (Bezier curve) 2020-12-03 16:57:48 +02:00
Vaibhav Soni
5c0ea294ce
Update article.md
In the section "String concatenation with binary +", the example of 2 + 2 + "1" was given, but there was no example for when the first operand is a string.
2020-12-03 09:08:02 +00:00
Vse Mozhe Buty
fd85fc5521 Fix possible typos in 6.3 (IndexedDB) 2020-12-02 23:31:17 +02:00
Letu Ren
7ffb6ce9bb
fix typo "colector" => "collector"
Fix typo in line 287
2020-12-02 16:55:33 +08:00
Vse Mozhe Buty
6abb98bce4
Fix possible typos in 6.1 (Cookies, document.cookie) 2020-12-01 16:43:52 +02:00
Kevin Jones
79f3caf351
Fix for issue #2314 2020-11-30 19:51:03 -06:00
Vse Mozhe Buty
00d2f33916
Fix typo and ambiguity in 5.12 (Server Sent Events) 2020-11-30 17:11:46 +02:00
Vse Mozhe Buty
5aebb8960a
Fix typos in 1.5.8 (WeakMap and WeakSet) 2020-11-29 18:19:28 +02:00
Vse Mozhe Buty
34e711cb23
Fix typo, add info in 1.11.5 (Promise API) 2020-11-29 18:06:45 +02:00
Vse Mozhe Buty
b1bee552b2
Fix typo in 1.99.1 (Proxy and Reflect) 2020-11-29 17:45:05 +02:00
Ilya Kantor
e1a3f634a4
Merge pull request #2327 from joaquinelio/patch-4
Update article.md
2020-11-29 11:25:39 +03:00
Ilya Kantor
9065fd33d0
Merge pull request #2302 from patrikbego/patch-3
Rephrased for clarity.
2020-11-29 11:25:18 +03:00
Ilya Kantor
361c702e8e
Merge pull request #2316 from vsemozhetbyt/patch-2
Fix typos in 4.3 (Blob)
2020-11-29 11:24:24 +03:00
Ilya Kantor
574dd84b23 closes #2319 2020-11-29 11:22:53 +03:00
Ilya Kantor
d05bbe0132
Merge pull request #2320 from vsemozhetbyt/patch-3
Fix typo in 5.2 (FormData)
2020-11-29 11:16:27 +03:00
Ilya Kantor
8b987211e2
Merge pull request #2321 from vsemozhetbyt/patch-4
Add missing parenthesis in 5.6 (Fetch API)
2020-11-29 11:16:18 +03:00
Ilya Kantor
4697b7bafe
Merge pull request #2322 from vsemozhetbyt/patch-5
Fix typos in 5.8 (XMLHttpRequest)
2020-11-29 11:16:02 +03:00
Ilya Kantor
277374fb00
Merge pull request #2323 from vsemozhetbyt/patch-6
Expand a note in 5.8 (XMLHttpRequest)
2020-11-29 11:15:36 +03:00
Ilya Kantor
59c54002ce
Merge pull request #2324 from vsemozhetbyt/p5.9
Replace deprecated property in 5.9 (Resumable file upload)
2020-11-29 11:15:19 +03:00
Ilya Kantor
8e6ace0d66
Merge pull request #2325 from vsemozhetbyt/patch-7
Fix typo in 5.11 (WebSocket)
2020-11-29 11:14:54 +03:00
Ilya Kantor
6f7d9cf0f8 minor fixes 2020-11-29 11:14:29 +03:00
Ilya Kantor
00f138c611
Merge pull request #2140 from peachesontour/patch-14
Typos
2020-11-29 11:13:50 +03:00
Ilya Kantor
ebd774d28d
Update 7-animation/2-css-animations/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-11-29 11:12:18 +03:00
joaquinelio
b852cfef7f
Update article.md 2020-11-29 05:04:39 -03:00
Ilya Kantor
d2ebb4236d
Merge pull request #2288 from lumosmind/patch-54
Promise.any
2020-11-29 10:56:43 +03:00
Ilya Kantor
e558805d8b fixes #2326 2020-11-29 10:02:02 +03:00
Vse Mozhe Buty
c828fe3f3b
Fix typo in 5.11 (WebSocket) 2020-11-29 02:45:50 +02:00
Dani Gámez Franco
8c7b9817e8
Add information about virtual/mobile keyboards and an additional keyboard inspection tool. 2020-11-28 23:47:10 +01:00
Vse Mozhe Buty
0f0a0c564a Replace deprecated property in 5.9 (Resumable file upload) 2020-11-28 22:49:20 +02:00
Vse Mozhe Buty
513d36eabf
Expand a note in 5.8 (XMLHttpRequest) 2020-11-28 19:56:23 +02:00
Vse Mozhe Buty
b79964ad8d
Fix typos in 5.8 (XMLHttpRequest) 2020-11-28 19:52:12 +02:00
Vse Mozhe Buty
ae6f990d62
Add missing parenthesis in 5.6 (Fetch API) 2020-11-27 16:47:08 +02:00
Vse Mozhe Buty
2793f330fd
Fix typo in 5.2 (FormData) 2020-11-26 20:22:57 +02:00
Vse Mozhe Buty
91da65d1d3 Fix typos in 4.3 (Blob) 2020-11-25 23:55:07 +02:00
Ilya Kantor
6ec4c4fc99 minor fixes 2020-11-25 23:24:12 +03:00
Ilya Kantor
fee665777f minor fixes 2020-11-25 23:23:59 +03:00
Ilya Kantor
0ac7894d10 minor fixes 2020-11-25 23:23:13 +03:00
Ilya Kantor
0eef95040c minor fixes 2020-11-25 23:22:50 +03:00
Ilya Kantor
a0b0d43060
Merge pull request #2315 from vsemozhetbyt/patch-1
Fix possible typos in 4.1 (ArrayBuffer, binary arrays)
2020-11-25 18:12:51 +03:00
Vse Mozhe Buty
193e174653
Fix possible typos in 4.1 (ArrayBuffer, binary arrays) 2020-11-25 17:10:48 +02:00
Ilya Kantor
b3974b3d51
Merge pull request #2313 from vsemozhetbyt/patch-12
Correct subhead in 3.1 (Popups and window methods)
2020-11-25 14:19:31 +03:00
Ilya Kantor
36c07028a3
Merge pull request #2309 from vsemozhetbyt/patch-11
Fix typo in 2.99.2 (Selection and Range)
2020-11-25 14:19:13 +03:00
Ilya Kantor
947afdda31
Merge pull request #2297 from patrikbego/patch-2
Fixed couple of grammar mistakes.
2020-11-25 13:55:19 +03:00
Mustafa Kemal Tuna
b73c2a4525
typo 2020-11-25 10:38:23 +03:00
Ilya Kantor
2554d3d4cc
Merge pull request #2293 from leviding/patch-33
FIX: typo error in dom-nodes and corresponding CSS need to be fixed
2020-11-25 10:38:09 +03:00
Mustafa Kemal Tuna
5f040588ff
Summary section is fixed
first fulfilled promise can not return error.
2020-11-25 10:37:06 +03:00
Mustafa Kemal Tuna
0e79e06444
example is fixed and summary is extended
example is fixed and summary is extended due to feedbacks
2020-11-25 10:30:19 +03:00
Ilya Kantor
ba277aa61f
Merge pull request #2292 from joaquinelio/patch-2
Buffer purpose. And missing "s".
2020-11-25 10:16:17 +03:00
Ilya Kantor
fbe2050f13
Merge pull request #2291 from vsemozhetbyt/patch-8
Fix typo in 2.3.1 (Mouse events)
2020-11-25 09:08:51 +03:00
Ilya Kantor
a2494a70dc
Merge pull request #2290 from vsemozhetbyt/patch-7
Fix typo in 2.2.5 (Dispatching custom events)
2020-11-25 09:01:20 +03:00
Ilya Kantor
b8fb9d489d
Merge pull request #2300 from patrikbego/patch-1
Rephrased for better clarity.
2020-11-25 09:01:03 +03:00
Ilya Kantor
865174e9c8
Merge pull request #2285 from joneskj55/patch-1
Minor grammar alteration.
2020-11-25 08:58:24 +03:00
Ilya Kantor
31d9441882
Update README.md 2020-11-25 08:48:48 +03:00
Ilya Kantor
47ca608d28
Update README.md 2020-11-25 08:48:30 +03:00
Ilya Kantor
9700f82b12
Merge pull request #2283 from leviding/patch-31
FIX: some typo error
2020-11-25 08:48:09 +03:00
Ilya Kantor
50c3e3de80
Merge pull request #2199 from vsemozhetbyt/patch-6
Clarify some things in 1.5.12
2020-11-25 08:47:10 +03:00
Patrik
79710c4dd1
Update article.md 2020-11-24 23:32:34 +01:00
Ilya Kantor
445d2c85e1 minor fixes 2020-11-24 23:32:40 +03:00
Ilya Kantor
721172983d
Merge pull request #2193 from vsemozhetbyt/patch-4
Fix possible typo in 1.5.7 task
2020-11-24 23:25:44 +03:00
Ilya Kantor
aacdf015c4
Merge pull request #2192 from vsemozhetbyt/patch-3
Symmetrize Map and Set summaries
2020-11-24 23:25:32 +03:00
Ilya Kantor
dd021301ca
Merge pull request #2295 from vsemozhetbyt/patch-10
Fix typo in 2.3.3 (Moving the mouse...)
2020-11-24 23:24:16 +03:00
Ilya Kantor
a9d23632b6
Merge pull request #2296 from odsantos/update-strings
Rephrase sentence.
2020-11-24 23:23:25 +03:00
Vse Mozhe Buty
b7a7e687a4 Fix typo in 2.99.2 (Selection and Range) 2020-11-24 22:14:11 +02:00
Vse Mozhe Buty
f7b22087f4 Fix typo in 2.3.1 (Mouse events) 2020-11-24 22:13:11 +02:00
Ilya Kantor
50a20d10d8
Merge pull request #2298 from manjufy/patch-1
Include missing fileServer
2020-11-24 23:12:34 +03:00
Ilya Kantor
c066feac6c
Merge pull request #2191 from vsemozhetbyt/patch-2
Clarify a bit ambiguous wording in 1.5.7
2020-11-24 23:11:43 +03:00
Ilya Kantor
501adfd7be
Merge pull request #2187 from vsemozhetbyt/patch-1
Fix my typos in 1.5.5
2020-11-24 23:04:40 +03:00
Ilya Kantor
246c6c4340
Merge branch 'master' into patch-1 2020-11-24 23:04:21 +03:00
Vse Mozhe Buty
54378cbbb7
Correct subhead in 3.1 (Popups and window methods) 2020-11-24 19:58:52 +02:00
Peter Roche
ac92672cbd
And a little more
More little tweaks. That should do for now.
2020-11-24 02:33:38 -07:00
Peter Roche
865c3290ed
Further minor changes to punctuation and wording
(even more minor)
2020-11-24 02:22:47 -07:00
Peter Roche
dcb3758f54
Merge pull request #2311 from javascript-tutorial/paroche-patch-20
Update article.md
2020-11-24 02:04:47 -07:00
Peter Roche
58136cb44f
Update article.md
Various minor punctuation and phrasing changes.
2020-11-24 01:59:50 -07:00
Ilya Kantor
1e590d693c
Merge pull request #2310 from joaquinelio/patch-3
fix nested markdown
2020-11-24 11:02:54 +03:00
joaquinelio
bd448509d2
fix nested markdown 2020-11-24 01:27:40 -03:00
Ilya Kantor
3cb134f29f
Merge pull request #2307 from vsemozhetbyt/patch-11
Fis typo in 2.5.2 (Scripts: async, defer)
2020-11-23 14:33:59 +03:00
Ilya Kantor
23da191b58 minor fixes 2020-11-22 14:33:24 +03:00
Ilya Kantor
2f0c37db83 fixes 2020-11-22 14:29:25 +03:00
Vse Mozhe Buty
0bdacaf9fc
Fis typo in 2.5.2 (Scripts: async, defer) 2020-11-22 12:35:10 +02:00
Mustafa Kemal Tuna
e289aba4ee
Update 1-js/11-async/05-promise-api/article.md
Co-authored-by: Vse Mozhe Buty <vsemozhetbyt@gmail.com>
2020-11-20 15:43:20 +03:00
Patrik
1feed09c5e
Rephrased for clarity. 2020-11-19 16:15:26 +01:00
Patrik
fa4b19e615
Rephrased for better clarity. 2020-11-19 15:04:22 +01:00
Manjunath Reddy
565fef832c
Include missing fileServer
In the `accept` method, 
`fileServer.serve(req, res)` was called however, noticed that it has not been initialized hence the change
2020-11-19 14:47:55 +08:00
Patrik
0b401e613e
Updated article.md
Fixed couple of grammar mistakes.
2020-11-19 02:40:36 +01:00
Osvaldo Dias dos Santos
5e9937afe0 Rephrase sentence. 2020-11-18 22:58:28 +01:00
Vse Mozhe Buty
0437d5702b Fix typo in 2.3.3 (Moving the mouse...) 2020-11-18 19:10:10 +02:00
LeviDing
cd052d1c47
Update article.md 2020-11-18 21:58:57 +08:00
LeviDing
3709b0b9b4
Update article.md 2020-11-18 21:55:24 +08:00
joaquinelio
ee8f6d153b
Update article.md 2020-11-18 01:08:34 -03:00
LeviDing
5aeb8fe6ae
Update article.md 2020-11-18 11:44:26 +08:00
joaquinelio
1ba96d43ce
missssing 2020-11-18 00:16:23 -03:00
LeviDing
149f63ed20
FIX: minor typo error, missing "alert( " 2020-11-18 10:37:38 +08:00
Vse Mozhe Buty
a81bb4a293
Fix typo in 2.2.5 (Dispatching custom events) 2020-11-17 17:39:17 +02:00
LeviDing
15780b3a24
Update task.md 2020-11-17 20:58:33 +08:00
Mustafa Kemal Tuna
891495cd47
Promise.any
I think Promise.any() must be in this article.
2020-11-17 07:55:57 +03:00
LeviDing
6db57d9494
Update article.md 2020-11-16 15:53:33 +08:00
LeviDing
9b3b10f507
Update README.md 2020-11-16 13:33:19 +08:00
LeviDing
adf83c64b7
Update article.md 2020-11-16 00:32:55 +08:00
LeviDing
80eb70fd90
Update article.md 2020-11-15 22:27:03 +08:00
LeviDing
358c38988d
Update article.md 2020-11-15 22:23:11 +08:00
LeviDing
5b63e81e4e
Update article.md 2020-11-15 22:12:00 +08:00
LeviDing
a39f437677
Update article.md 2020-11-15 21:46:06 +08:00
LeviDing
cb62d6d867
Update article.md 2020-11-15 21:19:03 +08:00
LeviDing
75e10e203e
Update article.md 2020-11-15 20:09:54 +08:00
LeviDing
7a67741a9b
Update article.md 2020-11-15 19:42:42 +08:00
Ilya Kantor
99e59ba611
Update article.md 2020-11-15 14:32:14 +03:00
Kevin Jones
26d449c80e
Minor grammar alteration. 2020-11-13 14:58:10 -06:00
LeviDing
ee2bc1c6bd
Update article.md 2020-11-14 00:26:50 +08:00
LeviDing
d977582751
Update article.md 2020-11-13 23:03:44 +08:00
LeviDing
fb43e39bd4
Update article.md 2020-11-13 22:53:12 +08:00
LeviDing
806e3710e5
Update article.md 2020-11-13 20:29:51 +08:00
LeviDing
6df0982d84
FIX: minor typo error 2020-11-13 20:22:16 +08:00
Ilya Kantor
331fafd626
Merge pull request #2202 from leviding/patch-24
FIX: change ; to ,
2020-11-11 18:54:57 +03:00
Ilya Kantor
611236fd7f
Merge pull request #2203 from leviding/patch-25
OPT: change "false" to "falsy"
2020-11-11 18:54:47 +03:00
Ilya Kantor
ad4bd59160
Merge pull request #2204 from vsemozhetbyt/patch-7
Fix a possible typo in 1.6.1
2020-11-11 18:54:37 +03:00
Ilya Kantor
32d4f13ce3
Merge pull request #2205 from vsemozhetbyt/patch-8
Fix a typo in 1.6.1 task solution
2020-11-11 18:54:20 +03:00
Ilya Kantor
5d7cba398b
Merge pull request #2275 from leviding/patch-30
FIX: delete extra space
2020-11-11 18:52:58 +03:00
Ilya Kantor
5607c7721f
Merge pull request #2276 from vsemozhetbyt/patch-18
Fix typos in 2.1.4 (Searching elements)
2020-11-11 18:52:48 +03:00
Ilya Kantor
22cf4b6e29
Merge pull request #2277 from ZhaoMuwei/patch-1
fix typo in 06-promisify article.md
2020-11-11 17:59:21 +03:00
Ilya Kantor
fd08e1c20c
Merge pull request #2279 from lumosmind/patch-53
look like ninja code
2020-11-11 17:59:12 +03:00
Ilya Kantor
fab613d2fd
Merge pull request #2280 from vsemozhetbyt/patch-11
Fix typo in 2.1.6 (Attributes and properties)
2020-11-11 17:57:51 +03:00
Ilya Kantor
29a7b6677e
Update article.md 2020-11-11 17:57:38 +03:00
Ilya Kantor
7cb6387201
Merge pull request #2281 from vsemozhetbyt/patch-10
Fix a typo in 1.11.3 (Promises chaining)
2020-11-11 17:56:44 +03:00
Vse Mozhe Buty
59a2f34123
Fix a typo in 1.11.3 (Promises chaining)
Refs: https://github.com/javascript-tutorial/en.javascript.info/pull/2252#issuecomment-724565094
2020-11-10 13:03:41 +00:00
Vse Mozhe Buty
211db88dd6
Fix typo in 2.1.6 (Attributes and properties) 2020-11-10 13:00:41 +00:00
Mustafa Kemal Tuna
a4194ceeff
look like ninja code
It can be more readable with same line of code. There was a lot of nested parenthesis.
2020-11-10 15:45:14 +03:00
Ilya Kantor
26b393a7d8
Merge pull request #2272 from vsemozhetbyt/patch-17
Fix link in 2.1.5 (Node properties...)
2020-11-10 12:12:27 +03:00
Ilya Kantor
2f4c29c69a
Merge pull request #2271 from vsemozhetbyt/patch-16
Correct solution explanation in 1.99.04 (Reference Type)
2020-11-10 12:12:17 +03:00
Ilya Kantor
876fdedc94
Merge pull request #2270 from vsemozhetbyt/patch-15
Fix outdated note in 1.99.04 (Reference Type)
2020-11-10 12:11:32 +03:00
Ilya Kantor
bbe7e0590a
Merge pull request #2266 from vsemozhetbyt/1.99.1
Fix typos in 'Proxy and Reflect'
2020-11-10 12:09:10 +03:00
Ilya Kantor
e9a528fba0
Merge pull request #2262 from vsemozhetbyt/patch-14
Correct comment in 1.13.1
2020-11-10 12:07:10 +03:00
Ilya Kantor
21d44a0590
Merge pull request #2261 from wam/change-var-to-let-in-regexp-sticky-section
Change `var` to `let` in 7.16 regexp-sticky
2020-11-10 12:06:47 +03:00
Ilya Kantor
eba228030b
Merge pull request #2260 from vsemozhetbyt/patch-13
Fix typo, add note in 1.12.2 (Async iteration)
2020-11-10 12:06:24 +03:00
Ilya Kantor
f782e9c962
Merge pull request #2259 from satyambnsal/master
Fix Optional chaining doc
2020-11-10 12:05:59 +03:00
Ilya Kantor
96b98541a3
Merge pull request #2258 from vsemozhetbyt/patch-12
Fix typo in 1.11.6 (Promisification)
2020-11-10 12:05:25 +03:00
Ilya Kantor
48b111d85f
Merge pull request #2257 from vsemozhetbyt/1.11.8
Fix semicolons, remove old note in 1.11.8
2020-11-10 12:05:14 +03:00
Ilya Kantor
2ff5eeb95a
Merge pull request #2255 from vsemozhetbyt/patch-11
Fix semicolons in 1.11.6  (Promisification)
2020-11-10 12:04:26 +03:00
Ilya Kantor
032e18b902
Merge pull request #2278 from javascript-tutorial/revert-2252-patch-10
Revert "Fix a typo in 1.11.3 (Promises chaining)"
2020-11-10 12:03:46 +03:00
Ilya Kantor
ca9a0225e1
Revert "Fix a typo in 1.11.3 (Promises chaining)" 2020-11-10 12:03:31 +03:00
Ilya Kantor
12a5cb02d7
Merge pull request #2252 from vsemozhetbyt/patch-10
Fix a typo in 1.11.3 (Promises chaining)
2020-11-10 12:03:16 +03:00
Ilya Kantor
fd6861e56b
Merge pull request #2251 from johnjacobkenny/patch-1
Update article.md typo
2020-11-10 12:03:05 +03:00
Ilya Kantor
27f6935594
Merge pull request #2250 from odsantos/fix-regexp-char-class-typo
Fix typo.
2020-11-10 12:02:52 +03:00
ZhaoMuwei
a914bad83c
fix typo in 06-promisify article.md
promisiefy -> promisify
2020-11-10 16:43:34 +08:00
Vse Mozhe Buty
8f912948a9
Fix typos in 2.1.4 (Searching elements) 2020-11-09 16:19:36 +00:00
LeviDing
bd23930044
Update article.md 2020-11-09 22:29:54 +08:00
Ilya Kantor
9e99c367ab
Merge pull request #2249 from vsemozhetbyt/patch-9
Fix semicolons in 1.11.1 (Introduction: callbacks)
2020-11-09 13:28:19 +03:00
Ilya Kantor
b589f38b4d
Merge pull request #2210 from leviding/patch-27
FIX: delete extra space
2020-11-09 13:27:59 +03:00
Vse Mozhe Buty
bf3c878eb0
Fix link in 2.1.5 (Node properties...) 2020-11-05 20:41:07 +00:00
Vse Mozhe Buty
e25caaec2e
Correct solution explanation in 1.99.04 (Reference Type) 2020-11-05 20:37:29 +00:00
Vse Mozhe Buty
422ef44b6b
Fix outdated note in 1.99.04 (Reference Type)
Now this chapter is at the end of the general section.
2020-11-05 20:29:52 +00:00
Vse Mozhe Buty
b83f2d7f1d Fix typos in 'Proxy and Reflect' 2020-11-04 20:32:44 +02:00
Vse Mozhe Buty
4e9a33542f
Correct comment in 1.13.1
Strictly speaking, there is no error here,
as `typeof` does not produce errors with undefined variables.
2020-11-01 22:54:30 +02:00
Will Atwood Mitchell
ec81513954 Change var to let in 7.16 regexp-sticky
Commit 10d1b1f25 added a hint about which word would be found by
a certain regexp:

"A call to str.match(/\w+/) will find only the first word in the line
(var). That’s not it."

Unfortunately the result is incorrect: the regexp would find `let`, not
`var`.

Updating the hint should resolve any confusion. The example has been
tested in the console to ensure that the regexp does indeed return
`let`.
2020-11-01 14:41:55 -05:00
Vse Mozhe Buty
05dfb56786
Fix typo, add note in 1.12.2 (Async iteration) 2020-11-01 18:59:36 +02:00
satyam bansal
0bdf17e74b
Fix Optional chaining doc 2020-11-01 17:59:28 +05:30
Ilya Kantor
dccca58f26
Update article.md 2020-11-01 09:54:02 +03:00
Ilya Kantor
010bde1a97
Update article.md 2020-11-01 09:50:38 +03:00
Ilya Kantor
0e0f4e35a2
Update article.md 2020-11-01 09:24:12 +03:00
Vse Mozhe Buty
58d9f752b6
Fix typo in 1.11.6 (Promisification) 2020-11-01 03:03:36 +02:00
Vse Mozhe Buty
37c6a31de5 Fix semicolons, remove old note in 1.11.8 2020-11-01 01:45:02 +02:00
Ilya Kantor
9a6a9fb584
Update article.md 2020-11-01 00:16:29 +03:00
Vse Mozhe Buty
d5a88b6b2a
Fix semicolons in 1.11.6 (Promisification) 2020-10-31 18:10:32 +02:00
Vse Mozhe Buty
1236996ba1
Fix a typo in 1.11.3 (Promises chaining) 2020-10-31 12:57:05 +02:00
Kenny John Jacob
0b6cfc9b1e
Update article.md 2020-10-31 14:44:00 +05:30
Osvaldo Dias dos Santos
c3979cdd41 Fix typo. 2020-10-31 05:59:18 +01:00
Vse Mozhe Buty
2f822c8ec3
Fix semicolons in 1.11.1 (Introduction: callbacks) 2020-10-30 18:01:51 +02:00
Ilya Kantor
f2078b1d80
Update article.md 2020-10-30 00:02:37 +03:00
Ilya Kantor
8c39566600
Merge pull request #2240 from vsemozhetbyt/patch-12
Add missing semicolons in 1.9.2 (Class inheritance)
2020-10-29 19:54:05 +03:00
Ilya Kantor
47414944e1
Merge pull request #2239 from vsemozhetbyt/patch-11
Clarify task code place in 1.9.1 (Class basic syntax)
2020-10-29 19:53:03 +03:00
Ilya Kantor
a6f101c507
Merge pull request #2238 from vsemozhetbyt/patch-10
Delete excess semicolon in 1.9.1 (Class basic syntax)
2020-10-29 19:52:53 +03:00
Ilya Kantor
1f2987d959
Merge pull request #2237 from plakxj/patch-1
Update article.md
2020-10-29 19:52:33 +03:00
Ilya Kantor
879cfa0939
Merge pull request #2236 from mikemitchell574/patch-4
Add emphasis for clarity
2020-10-29 19:52:06 +03:00
Ilya Kantor
4379770f03
Merge pull request #2235 from vsemozhetbyt/patch-9
Fix links in 1.8.4 (Prototype methods)
2020-10-29 19:51:54 +03:00
Ilya Kantor
0da8037efb
Merge pull request #2234 from mikemitchell574/patch-3
Update topic sentence
2020-10-29 19:51:41 +03:00
Ilya Kantor
6a3835a7d1
Merge pull request #2233 from mikemitchell574/patch-1
Replace rules.indent array with number
2020-10-29 19:51:27 +03:00
Ilya Kantor
ca17a69ad9
Merge pull request #2231 from Dewke/dewke-minor-fix
Minor clarification on WeakMap and WeakSet
2020-10-29 19:50:30 +03:00
Ilya Kantor
0c760be1ee
Update task.md 2020-10-29 19:49:40 +03:00
Ilya Kantor
2a55b5b21c
Merge pull request #2230 from Herrera-pgoat/patch-1
Update task.md
2020-10-29 19:49:06 +03:00
Ilya Kantor
d1f4466084
Merge pull request #2241 from mikemitchell574/patch-6
Include "object" in MDN link
2020-10-29 18:44:39 +03:00
Ilya Kantor
075e041973
Merge pull request #2243 from Youngjin-KimY/patch-1
modify typo
2020-10-29 18:44:27 +03:00
Ilya Kantor
dc415a6473
Merge pull request #2245 from vsemozhetbyt/patch-13
Fix possibly outdated note in 1.9.6 (instanceof)
2020-10-29 18:43:11 +03:00
Vse Mozhe Buty
972c7ab36c
Fix possibly outdated note in 1.9.6 (instanceof)
It seems there are no polymorphic functions in this chapter.
2020-10-29 17:34:23 +02:00
youngjin-kimY
98d1dc9645 modify typo 2020-10-29 19:55:59 +09:00
mikemitchell574
7aa2867cb1
Include "object" in MDN link 2020-10-28 06:59:54 -04:00
Vse Mozhe Buty
9a3567857d
Add missing semicolons in 1.9.2 (Class inheritance) 2020-10-27 19:24:45 +02:00
Vse Mozhe Buty
9bf1489101
Clarify task code place in 1.9.1 (Class basic syntax) 2020-10-27 18:37:31 +02:00
Vse Mozhe Buty
0682ae7c65
Delete excess semicolon in 1.9.1 (Class basic syntax) 2020-10-27 18:30:17 +02:00
start
980f487a11
Update article.md
the match position is 7
2020-10-27 16:18:32 +08:00
mikemitchell574
ccfec1fae0
Add emphasis for clarity 2020-10-25 16:07:19 -04:00
Vse Mozhe Buty
7ee9c6a9e1
Fix links in 1.8.4 (Prototype methods)
Current links are 404.
2020-10-25 18:40:42 +02:00
mikemitchell574
901e5ef8a4
Update topic sentence
A simple fix to better frame the difference between a transpiler and a polyfill.
2020-10-24 22:10:06 -04:00
mikemitchell574
2e057065b7
Replace rules.indent array with number
ESLint 7.12.0 indent rule configuration now only accepts a number value. The array provided returns a runtime error.
2020-10-24 11:00:39 -04:00
Dawid Kopys
567d911f63 Minor clarification on WeakMap and WeakSet 2020-10-24 13:31:46 +02:00
Herrera-pgoat
58ee49a958
Update task.md
Made it clear what the question was asking from the user.
2020-10-22 16:05:32 -05:00
Ilya Kantor
2d5be7b730
Merge pull request #2229 from vsemozhetbyt/patch-14
Fix typos, specify link in 1.6.8 (Scheduling)
2020-10-22 23:46:42 +03:00
Ilya Kantor
44252ada82
Merge pull request #2228 from vsemozhetbyt/patch-13
Fix possible typo in 1.6.7 ("new Function" syntax)
2020-10-22 23:46:17 +03:00
Ilya Kantor
decb6a2aff
Merge pull request #2226 from vsemozhetbyt/patch-12
Fix a typo in 1.6.6 (function object, NFE)
2020-10-22 23:46:02 +03:00
Ilya Kantor
7ddddd299d
Merge pull request #2224 from vsemozhetbyt/patch-11
Mention function declaration in 1.6.5 (global object)
2020-10-22 23:45:49 +03:00
Ilya Kantor
bd0fbbe24d
Merge pull request #2219 from vsemozhetbyt/patch-9
Fix typo in 1.4.7 (optional chaining)
2020-10-22 23:43:07 +03:00
Ilya Kantor
a10d94d983
Merge pull request #2218 from aruku/aruku-patch-1
One addition and one fix
2020-10-22 23:42:55 +03:00
Ilya Kantor
3897d24e7e
Merge pull request #2214 from leviding/patch-29
FIX: delete extra space
2020-10-22 23:42:12 +03:00
Ilya Kantor
c8edd84687
Merge pull request #2213 from leviding/patch-28
FIX: change ; to ,
2020-10-22 23:41:58 +03:00
Vse Mozhe Buty
ad4959226f
Fix typos, specify link in 1.6.8 (Scheduling) 2020-10-22 23:13:56 +03:00
Vse Mozhe Buty
518daec180
Fix possible typo in 1.6.7 ("new Function" syntax) 2020-10-22 08:42:41 +03:00
Vse Mozhe Buty
e8455bc5bc
Fix a typo in 1.6.6 (function object, NFE) 2020-10-21 20:36:09 +03:00
Vse Mozhe Buty
4a75ea406c
Mention function declaration in 1.6.5 (global object) 2020-10-21 19:59:06 +03:00
Ilya Kantor
ae723281e5
Merge pull request #2222 from vsemozhetbyt/patch-11
Remove possibly outdated comment
2020-10-20 23:25:18 +03:00
Vse Mozhe Buty
b0c60e3b29
Remove possibly outdated comment
Currently, the error is alerted and the console is empty (at least in Chrome).
2020-10-20 23:22:00 +03:00
Vse Mozhe Buty
9b2f866a39
Fix typo in 1.4.7 (optional chaining) 2020-10-20 20:08:15 +03:00
Eduardo
ad3a7cc6f3 Fix typo (I think) 2020-10-20 09:43:49 -04:00
Eduardo
7d05adac56 Mention HTML attribute events in the summary 2020-10-20 09:43:30 -04:00
Ilya Kantor
971a32e114
Update article.md 2020-10-20 11:56:11 +03:00
Ilya Kantor
24ff585f6b
Update article.md 2020-10-20 11:55:51 +03:00
Ilya Kantor
a50239806a
Update article.md 2020-10-20 11:41:34 +03:00
Ilya Kantor
6393a9fe66
Update article.md 2020-10-20 11:40:25 +03:00
Ilya Kantor
614c5ff214
Update article.md 2020-10-20 11:38:38 +03:00
Ilya Kantor
1197b01da5
Update article.md 2020-10-20 11:34:54 +03:00
Ilya Kantor
e92bbb1303
Update article.md 2020-10-20 11:29:31 +03:00
Ilya Kantor
9ad8f66e58
Update article.md 2020-10-20 11:28:12 +03:00
Ilya Kantor
d961910b6c
Update article.md 2020-10-20 11:27:04 +03:00
Ilya Kantor
fca113b532
Update article.md 2020-10-20 11:20:50 +03:00
Ilya Kantor
d4120a0ae5
Update article.md 2020-10-20 11:17:09 +03:00
Ilya Kantor
44a17a32ca
Update article.md 2020-10-20 11:14:04 +03:00
Ilya Kantor
c69ca0dd1c
Update article.md 2020-10-20 11:13:04 +03:00
Ilya Kantor
7487ce9ebe
Update article.md 2020-10-20 11:11:31 +03:00
Ilya Kantor
959dc23a9b
Update article.md 2020-10-20 11:11:07 +03:00
Ilya Kantor
e74295c42c
Update article.md 2020-10-20 08:37:18 +03:00
Ilya Kantor
c634301e90
Update article.md 2020-10-20 08:27:07 +03:00
Ilya Kantor
9d4a69d42d
Update article.md 2020-10-20 08:26:40 +03:00
Ilya Kantor
030decc910
Update article.md 2020-10-20 08:24:11 +03:00
LeviDing
4131b29d7d
FIX: delete extra space 2020-10-19 09:26:53 +08:00
LeviDing
649539ef05
FIX: delete extra space 2020-10-18 22:28:23 +08:00
LeviDing
ca1ef0d734
FIX: change ; to , 2020-10-18 22:23:10 +08:00
Ilya Kantor
d6e88647b4 minor fixes 2020-10-17 21:50:55 +03:00
LeviDing
de8cf9fe5c
FIX: delete extra space 2020-10-17 14:49:29 +08:00
Ilya Kantor
10d1b1f25f minor fixes 2020-10-16 10:07:28 +03:00
Ilya Kantor
1fbc5082ff
Merge pull request #2207 from joaquinelio/patch-2
redundant "use case"
2020-10-16 09:39:46 +03:00
joaquinelio
9d498666d0
redundant "use case" 2020-10-15 19:48:47 -03:00
Vse Mozhe Buty
187e8e13fa
Fix a typo in 1.6.1 task solution 2020-10-15 18:35:59 +03:00
Vse Mozhe Buty
d6f98e1ed6
Fix a possible typo in 1.6.1 2020-10-15 18:34:19 +03:00
LeviDing
fe3ba111bf
OPT: change "false" to "falsy" 2020-10-15 22:11:10 +08:00
LeviDing
f0c55baab7
FIX: change ; to , 2020-10-15 13:16:32 +08:00
Vse Mozhe Buty
0be77b09a0
Clarify some things in 1.5.12 2020-10-15 04:44:52 +03:00
Alexey Pyltsyn
15767fc3cf
Merge pull request #2198 from leviding/patch-23
Fix: change ; => ,
2020-10-14 23:44:44 +03:00
LeviDing
6e61e8a466
Fix: change ; => , 2020-10-14 15:17:19 +08:00
Ilya Kantor
872cc6aded
Merge pull request #2195 from joaquinelio/patch-1
Winnie Pooh case...  : )
2020-10-13 09:24:44 +03:00
Ilya Kantor
8ccc7f6fc0
Merge pull request #2190 from dorelljames/patch-2
Update 2-ui/4-forms-controls/1-form-elements/article.md
2020-10-13 09:22:35 +03:00
joaquinelio
54df94da3d
Winnie Pooh case... : ) 2020-10-12 16:29:24 -03:00
Dorell James
552c0b79e1
Update article.md 2020-10-13 00:53:21 +08:00
Ilya Kantor
ac289950ea
Merge pull request #2194 from dorelljames/patch-4
Update task.md
2020-10-12 19:37:22 +03:00
Dorell James
040efef646
Update task.md
Updated based on suggestion on issue #1769
2020-10-13 00:36:26 +08:00
Vse Mozhe Buty
154bf024ac
Fix possible typo in 1.5.7 task 2020-10-12 19:29:41 +03:00
Vse Mozhe Buty
7faa49eed9
Symmetrize Map and Set summaries 2020-10-12 19:27:38 +03:00
Vse Mozhe Buty
104bee3ccc
Clarify a bit ambiguous wording in 1.5.7 2020-10-12 19:22:13 +03:00
Dorell James
bb703101b9
Update 2-ui/4-forms-controls/1-form-elements/article.md
This updates a small grammar error and adds some helpful info. Hoping it's better now. Let me know if you need any more changes and I'll update it immediately.
2020-10-13 00:07:01 +08:00
Ilya Kantor
1431a2552e
Merge pull request #2188 from joaquinelio/patch-1
assign "it"
2020-10-12 13:00:02 +03:00
joaquinelio
75aed55284
assign "it" 2020-10-12 06:36:48 -03:00
Vse Mozhe Buty
689392ecce Fix my typos in 1.5.5 2020-10-11 22:47:26 +03:00
Ilya Kantor
0599d07b3c
Merge pull request #2177 from vsemozhetbyt/patch-3
Make code example more realistic and safe
2020-10-11 17:23:27 +03:00
Ilya Kantor
b6f3f5cbc5
Merge pull request #2175 from vsemozhetbyt/patch-2
Fix typos in 1.5.3
2020-10-11 17:22:48 +03:00
Ilya Kantor
1a4849ac4c
Merge pull request #2178 from vsemozhetbyt/patch-4
Correct outdated info
2020-10-11 17:21:09 +03:00
Ilya Kantor
60ec589222
Merge pull request #2179 from vsemozhetbyt/patch-5
Fix some possible typos and omissions in 1.5.5
2020-10-11 17:20:11 +03:00
Ilya Kantor
80efcda2cb
Merge pull request #2180 from vsemozhetbyt/patch-6
Add a note on some()/every() short circuit
2020-10-11 17:19:16 +03:00
Ilya Kantor
37f67e6e7b
Merge pull request #2181 from vsemozhetbyt/patch-7
Mention arr.flat()/arr.flatMap() in 1.5.5
2020-10-11 17:18:50 +03:00
Ilya Kantor
95016bc98f
Merge pull request #2183 from Taruna06/master
typo
2020-10-11 17:17:53 +03:00
Ilya Kantor
3ba22f75a7
Merge pull request #2184 from vsemozhetbyt/patch-8
Fix a typo in a 1.5.5 task solution
2020-10-11 17:17:25 +03:00
Ilya Kantor
8e613bc62c
Merge pull request #2185 from vsemozhetbyt/patch-9
Make a solution of 1.5.5 task more correct
2020-10-11 17:17:16 +03:00
Ilya Kantor
35f47b9d40
Merge pull request #2172 from vsemozhetbyt/patch-1
Fix link in 1.5.3
2020-10-11 17:16:40 +03:00
Ilya Kantor
d3b38c2837 minor fixes 2020-10-11 17:16:04 +03:00
Ilya Kantor
3fbbcd1559 minor fixes 2020-10-11 17:15:40 +03:00
Ilya Kantor
e7953a4759 minor fixes 2020-10-11 17:14:36 +03:00
Ilya Kantor
1273ae44e3 minor fixes 2020-10-11 17:12:11 +03:00
Vse Mozhe Buty
3188466967
Make a solution of 1.5.5 task more correct
Proposed solution is in sync with some previous sort function examples. It also makes sorting stable (does not skip `0` result).
2020-10-10 21:22:06 +03:00
Vse Mozhe Buty
4ee44dc002
Fix a typo in a 1.5.5 task solution 2020-10-10 21:11:53 +03:00
Taruna06
2336288174
typo 2020-10-10 10:20:26 +05:30
Vse Mozhe Buty
7b70f79592
Mention arr.flat()/arr.flatMap() in 1.5.5 2020-10-10 00:17:09 +03:00
Vse Mozhe Buty
dea1a2d375
Add a note on some()/every() short circuit 2020-10-10 00:05:41 +03:00
Vse Mozhe Buty
858ad69e92
Fix some possible typos and omissions in 1.5.5 2020-10-09 23:46:13 +03:00
Ilya Kantor
edef0b4306 minor fixes 2020-10-09 19:01:31 +03:00
Vse Mozhe Buty
54c8247210 Fix link in 1.5.3
The page of the current link has not this anchor anymore.
2020-10-09 18:48:02 +03:00
Vse Mozhe Buty
b2b83b7472
Correct outdated info
As of the last versions of V8 (i.e. Chrome and Node.js), the current info seems outdated.

See also https://v8.dev/blog/array-sort
2020-10-09 17:47:25 +03:00
Vse Mozhe Buty
f880f1fb63
Make code example more realistic and safe
1. Without a real sorting part, the data output is not the same as with real sort (as the array is not really sorted when the callback returns `undefined`).
2. Current example may somehow encourage a reader to write sorting callbacks with undetermined behavior.
2020-10-09 17:42:08 +03:00
Peter Roche
bdb3def468
Update article.md
As promised.
2020-10-09 02:40:53 -06:00
Vse Mozhe Buty
176e5f839f
Fix typos in 1.5.3 2020-10-08 17:59:04 +03:00
Ilya Kantor
6c6a7b5174
Merge pull request #2163 from Anurag-Chauhan-289/master
improved doc
2020-10-07 21:33:02 +03:00
Ilya Kantor
ea8fc1af20
Merge pull request #2162 from CrypterSr/patch-1
Update README.md
2020-10-07 21:32:37 +03:00
Ilya Kantor
fa0bcd3e1f
Merge pull request #2159 from vsemozhetbyt/patch-2
Fix link in 1.2.18
2020-10-07 21:30:29 +03:00
Ilya Kantor
d77dbf8103
Merge pull request #2158 from Ledorub/indexeddb-example-fix
Fix wrong variables names.
2020-10-07 21:30:15 +03:00
Ilya Kantor
77e2deea82
Merge pull request #2157 from ZYinMD/patch-3
correct minor typo
2020-10-07 21:29:22 +03:00
Ilya Kantor
1200946a72
Merge pull request #2155 from Mr0cket/patch-2
1.4.1.8_multiply numeric - Update 'properties' to 'property values'
2020-10-07 21:27:16 +03:00
Ilya Kantor
6f24128e44
Merge pull request #2151 from haond10adp/patch-1
minor change
2020-10-07 19:45:43 +03:00
Ilya Kantor
f4cf5808c8 minor fixes 2020-10-06 13:04:37 +03:00
Alexey Pyltsyn
545f514790
Remove extra trailing style tag 2020-10-06 02:14:09 +03:00
Ilya Kantor
f409905f7b minor fixes 2020-10-06 00:47:39 +03:00
Alexey Pyltsyn
ae06ca62bb
Merge pull request #2168 from vsemozhetbyt/patch-3
Fix syntax enumeration in 1.4.7
2020-10-05 23:32:23 +03:00
Vse Mozhe Buty
4320617f8a
Fix syntax enumeration in 1.4.7
Currently, syntax of the 1 and 3 cases is the same.
2020-10-05 19:59:16 +03:00
Ilya Kantor
6fca8a4b31 minor fixes 2020-10-05 14:54:28 +03:00
Ilya Kantor
181cc781ab minor fixes 2020-10-04 23:11:08 +03:00
Anurag Chauahan
1d13d1155d
Update article.md 2020-10-02 00:53:48 +05:30
Anurag Chauahan
af9b33925c
Update README.md 2020-10-02 00:46:50 +05:30
CrypterSr
f11dd6d07b
Update README.md 2020-10-01 23:24:12 +05:30
Ilya Kantor
ecfd1136af minor 2020-10-01 19:22:39 +03:00
Vse Mozhe Buty
c970f424c2 Fix link in 1.2.18
The current link is redirected to the parent chapter.
This fix is in sync with
https://javascript.info/operators#bitwise-operators and #2117
2020-09-28 18:03:48 +03:00
Denis Ivanov
af95ad1570 Fix wrong variables names. 2020-09-28 17:02:28 +03:00
Zhi Yin
2c65914e3b
correct minor typo 2020-09-27 16:13:21 -04:00
Ilya Kantor
f489145731
Merge pull request #2154 from vsemozhetbyt/patch-1
Fix typo in 1.2.12
2020-09-27 12:28:52 +03:00
Milo Silva
73550e58ac
Update 'properties' to 'property values'
The task asks to multiply numeric object 'properties', however the term 'object properties' include both the 'property keys' of the object as well as the 'property values' of the object. It is clear the intention of the task is to change property values. 
This change improves clarity of the task description.
2020-09-27 11:08:51 +02:00
Vse Mozhe Buty
740a2dfd5b
Fix typo in 1.2.12 2020-09-27 11:11:41 +03:00
Nguyễn Đức Hào
02e82ad409
Update article.md 2020-09-26 17:08:31 +07:00
Nguyễn Đức Hào
5189d51cd7
minor change 2020-09-26 09:16:33 +07:00
Ilya Kantor
a6017db26f minor fixes 2020-09-24 23:01:57 +03:00
Ilya Kantor
ea673f4f2f minor fixes 2020-09-24 23:01:34 +03:00
Ilya Kantor
2f6e4a27e2 minor fixes 2020-09-24 23:01:15 +03:00
Ilya Kantor
d92cb4743f minor fixes 2020-09-24 23:01:09 +03:00
Ilya Kantor
2d63151779 minor fixes 2020-09-24 23:00:02 +03:00
Ilya Kantor
e4c928ba2d minor fixes 2020-09-24 22:59:06 +03:00
Ilya Kantor
e76cf3a3c2 closes #2136 #2150 2020-09-24 22:51:36 +03:00
Ilya Kantor
b18b5ba761 minor fixes 2020-09-24 17:07:39 +03:00
Ilya Kantor
58ed032bf8
Merge pull request #2129 from vsemozhetbyt/ch-1-2-9
Address some possible inconsistencies in 1.2.9
2020-09-24 14:21:57 +03:00
Ilya Kantor
1f8b72be8f
Merge pull request #2146 from Ruslan-Aleev/patch-1
Changed "position" to "index" for slice() method
2020-09-24 14:20:49 +03:00
Ilya Kantor
9705a09ca7 minor fixes 2020-09-24 14:20:26 +03:00
Ruslan Aleev
6d9b4437a4
Changed "position" to "index" for slice() method 2020-09-24 12:38:24 +03:00
Ilya Kantor
e9686467e6 minor fixes, close #2137 2020-09-24 11:55:34 +03:00
Ilya Kantor
165ea8373c
Merge pull request #2125 from shanesc/patch-1
Add Edge to list of V8-powered browsers
2020-09-24 10:42:03 +03:00
Vse Mozhe Buty
071efd841b Address some possible inconsistencies in 1.2.9 2020-09-23 18:57:10 +03:00
Ilya Kantor
26505f3d15
Merge pull request #2121 from zzy0302/master
PR for issues/2119
2020-09-23 15:36:50 +03:00
Ilya Kantor
8cb4268d0a
Merge pull request #1672 from galacemiguel/patch-1
Fix grammar and construction in 2.1.10
2020-09-23 15:31:04 +03:00
Peter Kampjes
5168eaa4b1
Update 7-animation/2-css-animations/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-23 08:00:53 -03:00
Peter Kampjes
6c37da4a66
Update 7-animation/2-css-animations/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-23 07:59:54 -03:00
Miguel N. Galace
482ca750a4
Merge branch 'master' into patch-1 2020-09-23 18:44:06 +08:00
Miguel N. Galace
d3ad4c3d82 Fix grammar and construction in 2.1.10 2020-09-23 18:42:30 +08:00
Ilya Kantor
01e87b58a2
Merge pull request #2118 from vsemozhetbyt/ch-1-2-8
Fix old link and excess line break in 1.2.8
2020-09-23 12:47:50 +03:00
Ilya Kantor
6ea208bfa3
Merge pull request #2116 from amit1702/master
Dynamic script document order execution is done with async=false
2020-09-23 12:47:27 +03:00
Ilya Kantor
b3a826e654
Merge pull request #2122 from Isildur46/fix-Trident-is-not-a-JS-engine
Knowledge correcting: Delete "Trident"
2020-09-23 12:45:53 +03:00
Ilya Kantor
5878a19c62
Merge pull request #2123 from leviding/patch-22
Fix minor typo error
2020-09-23 12:45:33 +03:00
Ilya Kantor
e61bfa2631 minor fixes 2020-09-23 12:42:10 +03:00
Ilya Kantor
c48c52cb81
Merge pull request #2127 from MuhammedZakir/master
Improve make-army task
2020-09-23 12:22:20 +03:00
Ilya Kantor
894e1b5a7e minor fixes 2020-09-23 12:22:06 +03:00
Ilya Kantor
2aad40bd3b
Merge pull request #2134 from vsemozhetbyt/1.2.11
Address some possible issues in 1.2.11
2020-09-23 12:20:07 +03:00
Ilya Kantor
5c388dd791 content 2020-09-23 12:00:09 +03:00
Peter Kampjes
f25dca843a
Update 7-animation/2-css-animations/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-22 20:46:33 -03:00
Vse Mozhe Buty
64f3015dfd Address some possible issues in 1.2.11 2020-09-23 02:40:46 +03:00
Peter Kampjes
443af20b99
Update 7-animation/2-css-animations/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-22 19:51:52 -03:00
Peter Kampjes
2be35c9951
Update 7-animation/2-css-animations/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-22 19:51:14 -03:00
Peter Kampjes
ed497e7e9c
Update 7-animation/2-css-animations/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-22 19:50:12 -03:00
Peter Kampjes
e0db058851
Update 7-animation/2-css-animations/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-22 19:38:22 -03:00
Peter Kampjes
74526b4800
Update 7-animation/2-css-animations/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-22 19:34:23 -03:00
Peter Kampjes
7c12746dc0
Update 7-animation/2-css-animations/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-22 19:01:20 -03:00
Peter Kampjes
2b8354b305
Update 7-animation/2-css-animations/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-22 19:00:26 -03:00
Ilya Kantor
75680eef5c
Merge pull request #2142 from joaquinelio/patch-1
One more step please
2020-09-22 21:27:54 +03:00
joaquinelio
8a330b3973
One more step please 2020-09-22 15:03:47 -03:00
Ilya Kantor
e7f6a8804c
Merge pull request #2126 from peachesontour/patch-13
Typos
2020-09-22 14:20:55 +03:00
Peter Kampjes
9bae8fdf3e
Typos 2020-09-21 18:25:55 -03:00
Ilya Kantor
85cbc1ce6f
Merge pull request #2139 from joaquinelio/linky
mdn links
2020-09-21 22:29:27 +03:00
joaquinelio
82b6a3be99 mdn links 2020-09-21 15:21:57 -03:00
zzy0302
3a64e5055b
Update 1-js/02-first-steps/05-types/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-21 11:31:06 +08:00
Peter Kampjes
172ef78b47
Update 6-data-storage/03-indexeddb/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-18 14:43:52 -03:00
Peter Kampjes
d56c49ee48
Update 6-data-storage/03-indexeddb/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-18 14:43:15 -03:00
Peter Kampjes
d235632379
Update 6-data-storage/03-indexeddb/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-18 14:42:44 -03:00
Peter Kampjes
7b88ad9a9c
Update 6-data-storage/03-indexeddb/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-18 14:42:20 -03:00
MuhammedZakir
fdf8eb3f8c Improve make-army task
Fix grammar and indent some paragraphs.
Complements javascript-tutorial/en.javascript.info#2081.
2020-09-18 12:30:52 +05:30
Peter Kampjes
c040a011f1
Typos 2020-09-17 18:24:47 -03:00
Shane
a4b95f05a9
Add Edge to list of V8-powered browsers 2020-09-17 17:21:11 +01:00
zzy0302
1480263553
Update article.md 2020-09-17 23:15:42 +08:00
LeviDing
1e0b2bf4fe
Update article.md 2020-09-17 21:07:02 +08:00
zzy0302
9964e3f576
Update article.md 2020-09-17 16:55:35 +08:00
zzy0302
2f37f1c40b
Update article.md 2020-09-17 16:54:45 +08:00
Isildur46
244e7abdd3
Delete "Trident"
Knowledge correcting: Trident is not a JS engine.
2020-09-17 16:53:47 +08:00
zzy0302
26e6412262
Update article.md 2020-09-17 16:53:35 +08:00
zzy0302
7ab911c25f
Update article.md
Safari in iOS14 support BigInt
2020-09-17 16:52:17 +08:00
Vse Mozhe Buty
8e7e13d6a1 Fix old link and excess line break in 1.2.8 2020-09-16 03:50:16 +03:00
Ilya Kantor
e074a5f825 minor fixes 2020-09-15 09:23:06 +03:00
Ilya Kantor
dd24d33dd5
Merge pull request #2117 from vsemozhetbyt/patch-1
Fix link in 1.2.8
2020-09-14 10:59:40 +03:00
Vse Mozhe Buty
79ba52a8f8 Fix link in 1.2.8 2020-09-14 00:41:46 +03:00
Ilya Kantor
ff152b126e minor fixes 2020-09-13 23:58:53 +03:00
Ilya Kantor
2add921744 minor fixes 2020-09-13 23:58:34 +03:00
Ilya Kantor
c1e7bcb0df minor fixes 2020-09-13 23:56:48 +03:00
Amit Kumar
62e8e70987
Dynamic script async=false condition correction 2020-09-13 19:30:02 +05:30
Ilya Kantor
bd8e8a9bdd minor fixes 2020-09-12 19:48:22 +03:00
Ilya Kantor
e4a60f4fde
Merge pull request #2109 from Jarvis-3000/patch-1
Update article.md
2020-09-12 16:11:31 +03:00
Ilya Kantor
70456665de
Merge pull request #2108 from vsemozhetbyt/ch-1-2-6
Fix typo in 1.2.6
2020-09-12 16:11:12 +03:00
Ilya Kantor
a02f06c268
Merge pull request #2107 from LitStronger/patch-1
Update article.md
2020-09-12 16:10:57 +03:00
Ilya Kantor
f95cdc69a3
Merge pull request #2106 from vsemozhetbyt/ch-1-2-5
Sync safe Number borders across chapter 1.2.5
2020-09-12 16:10:43 +03:00
Ilya Kantor
4de92d6753 minor fixes 2020-09-12 16:10:22 +03:00
Ilya Kantor
e93e87deb0
Merge pull request #2110 from cristian-wang/patch-1
Update article.md
2020-09-12 16:02:13 +03:00
Ilya Kantor
f56f815155
Merge pull request #2111 from apcurran/patch-1
Corrected spelling of "representation"
2020-09-12 15:57:28 +03:00
Ilya Kantor
706e7acbf8 minor fixes 2020-09-12 15:57:10 +03:00
Ilya Kantor
a641a1a770
Merge pull request #2113 from MuhammedZakir/5-10-long-polling
Improve 'long polling' article. Complements #2073.
2020-09-12 15:52:31 +03:00
Ilya Kantor
593a9204c8
Merge pull request #2114 from MuhammedZakir/old-var-article
Fix javascript-tutorial#2098 - replace let with var in IIFE example
2020-09-12 15:51:38 +03:00
Ilya Kantor
17faacf683 minor 2020-09-12 15:11:25 +03:00
Muhammed Zakir
c040a90672
Added requested change 2020-09-11 10:00:53 +00:00
MuhammedZakir
99caa80018 Fix javascript-tutorial#2098 - replace let with var in IIFE example 2020-09-11 13:31:57 +05:30
Ilya Kantor
d16cec5741
Merge pull request #2112 from MuhammedZakir/some-corrections
Some Corrections
2020-09-11 10:53:08 +03:00
MuhammedZakir
164ae2ca73 Improve 'long polling' article. Complements javascript-tutorial#2073. 2020-09-11 13:21:46 +05:30
MuhammedZakir
14b50caf41 Some Corrections
Fix javascript-tutorial#2090 - Spelling Mistake
Close javascript-tutorial#2079 - Remove 'elem' from `elem.scrollLeft/scrollTop`
2020-09-11 13:07:06 +05:30
Ilya Kantor
9f686c90ce improve makeArmy task 2020-09-10 19:29:57 +03:00
Ilya Kantor
c65a1e85b8 WIP 2020-09-10 19:02:34 +03:00
Ilya Kantor
0168147c81
Merge pull request #2081 from MuhammedZakir/master
Restructure the Solution for 'Army of Functions' task and Fix Typos
2020-09-10 18:05:14 +03:00
Ilya Kantor
b64a2304d8 refactor PEvents 2020-09-10 17:52:47 +03:00
Muhammed Zakir
9f099db565
Update solution.md 2020-09-10 14:42:04 +00:00
apcurran
ce37f7c8de
Corrected spelling of "representation"
Thank you!
2020-09-09 13:59:38 -05:00
Cristian Wang
e845b5f215
Update article.md
Hi guys, I looked at your article to solve my CORS issue but it didn't work. So eventually I found a question on StackOverflow that explained in order to make things work properly, I needed to add also "Access-Control-Allow-Origin: https://javascript.info" to the preflight response. Did anyone have the same issue? If so, we need to update the article in order to save the time of future readers :)

StackOverflow question: https://stackoverflow.com/questions/42558221/how-to-cors-enable-apache-web-server-including-preflight-and-custom-headers
2020-09-09 18:03:33 +02:00
Jarvis-3000
8d692067be
Update article.md 2020-09-09 09:54:55 +05:30
Vse Mozhe Buty
dc5de4868e Fix typo in 1.2.6 2020-09-08 16:56:35 +03:00
LitStronger
5a41a674dc
Update article.md
Maybe it is "Object.defineProperty()" rather than "defineProperty()"
2020-09-07 10:44:28 +08:00
Vse Mozhe Buty
2e192e03c1 Sync safe Number borders across chapter 1.2.5 2020-09-07 01:03:53 +03:00
Ilya Kantor
58f6599df7 minor fixes 2020-09-05 18:46:24 +03:00
Ilya Kantor
a9c170a3ad minor fixes 2020-09-05 18:13:23 +03:00
Ilya Kantor
2aa7e5539a minor fixes 2020-09-05 18:12:12 +03:00
Ilya Kantor
ffa154d1ca
Merge pull request #2023 from haond10adp/master
typo
2020-09-05 18:07:11 +03:00
Ilya Kantor
edc6126980
Merge pull request #2024 from lumosmind/patch-47
One line of code creates a lot of confusing
2020-09-05 18:06:54 +03:00
Ilya Kantor
ba5424a82d minor fixes 2020-09-05 18:04:50 +03:00
Ilya Kantor
88ad89f029
Merge pull request #2015 from leviding/patch-21
Delete a blank
2020-09-05 17:06:18 +03:00
Ilya Kantor
c1a3778e95
Merge pull request #1907 from leeyc0/patch-1
Confucius never said black cat quote
2020-09-05 17:06:08 +03:00
Ilya Kantor
94279abe98
Merge pull request #1738 from javascript-tutorial/paroche-patch-18
Update article.md
2020-09-05 17:05:05 +03:00
Ilya Kantor
fe6e3526aa
Merge pull request #2091 from joaquinelio/patch-1
misplaced "too"?
2020-09-05 17:04:35 +03:00
Ilya Kantor
0b7f426054
Merge pull request #2092 from peachesontour/patch-10
The last 2 code snippets shouldn't be runnable
2020-09-05 17:00:16 +03:00
Ilya Kantor
92e9028299
Merge pull request #2093 from Violet-Bora-Lee/class-inheritance-suggestion
suggestion to use alert method not console.log
2020-09-05 17:00:03 +03:00
Ilya Kantor
d36db207e9
Merge pull request #2094 from Violet-Bora-Lee/mouse-event-typo
fix typo and minor grammatical error
2020-09-05 16:59:44 +03:00
Ilya Kantor
952c13af6e minor fixes 2020-09-05 16:59:12 +03:00
Ilya Kantor
30386fc66c
Merge pull request #2095 from peachesontour/patch-11
Typos
2020-09-05 16:56:38 +03:00
Ilya Kantor
6701d9b9c2
Merge pull request #2096 from peachesontour/patch-12
Typos
2020-09-05 16:52:05 +03:00
Ilya Kantor
d1e4981505
Merge pull request #2102 from pushpend3r/patch-2
Typo
2020-09-05 16:50:15 +03:00
Ilya Kantor
7fd4f7d9fd
Merge pull request #2101 from henchies/patch-2
Update article.md
2020-09-05 16:50:05 +03:00
Ilya Kantor
2f1f6a1814
Merge pull request #2100 from yoga1234/patch-1
add missing closing bracket
2020-09-05 16:48:32 +03:00
Ilya Kantor
c0d638a127 minor fixes 2020-09-05 16:37:04 +03:00
Pushpender Singh
2bf5addf47
Typo
"Imediately" instead of "Immediately"
2020-09-04 21:12:46 +05:30
Henrik Nilsson
c1cd076a54
Update article.md
Somewhat enhanced readability
2020-09-04 11:40:52 +02:00
MuhammedZakir
0f5b63d86f Restructure the Solution for 'Army of Functions' task and Fix Typos
Fix #2068 - Army of Functions
Fix #2070 - Typo
Fix #2056 - Grammatical Error
Fix #2074 - Remove semi-colon after function declaration
2020-09-04 13:38:41 +05:30
Yogasmara
c658bb30f3
add missing closing bracket
Adding the missin closing bracket.
2020-09-03 16:54:31 +07:00
Ilya Kantor
2f4747be58 minor fixes 2020-09-03 09:57:40 +03:00
Peter Kampjes
cd3fb86f9c
Update 2-ui/99-ui-misc/01-mutation-observer/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-01 11:30:49 -03:00
Peter Kampjes
6895d38d3b
Update 2-ui/99-ui-misc/03-event-loop/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-01 09:17:05 -03:00
Peter Kampjes
cb9542b1e1
Update 2-ui/99-ui-misc/03-event-loop/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-01 09:13:02 -03:00
Peter Kampjes
0003221ae2
Update article.md 2020-09-01 09:09:58 -03:00
Peter Kampjes
be28fe248a
Update 2-ui/99-ui-misc/01-mutation-observer/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-01 09:06:58 -03:00
Peter Kampjes
8d71d86c70
Update 2-ui/99-ui-misc/01-mutation-observer/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-01 09:03:03 -03:00
Peter Kampjes
2b5502a2c8
Update 2-ui/99-ui-misc/01-mutation-observer/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-01 09:02:40 -03:00
Peter Kampjes
751f78a06c
Update 2-ui/99-ui-misc/01-mutation-observer/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-01 08:59:54 -03:00
Peter Kampjes
00178008b2
Update 2-ui/99-ui-misc/01-mutation-observer/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-01 08:59:20 -03:00
Peter Kampjes
2881c97d72
Update 2-ui/99-ui-misc/01-mutation-observer/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-01 08:56:29 -03:00
Peter Kampjes
d92984129c
Update 2-ui/99-ui-misc/01-mutation-observer/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-01 08:55:28 -03:00
Peter Kampjes
4830a26deb
Update 2-ui/99-ui-misc/01-mutation-observer/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2020-09-01 08:53:56 -03:00
Ilya Kantor
0bfebb4b46
Merge pull request #2097 from joaquinelio/patch-2
internal link format  info:
2020-08-31 09:57:06 +03:00
joaquinelio
bcf49d1607
internal link format info:
plis check my syntax , I can't test
2020-08-31 03:56:09 -03:00
Peter Kampjes
b9c4dbcaed
Typos 2020-08-30 08:17:54 -03:00
Peter Kampjes
51e5aa9b2c
Typos 2020-08-30 08:04:52 -03:00
Violet Bora Lee
4bd8ce5391 fix typo and minor grammatical error 2020-08-30 19:57:20 +09:00
Violet Bora Lee
3aaf519ca2 suggestion to use alert method not console.log 2020-08-30 19:53:28 +09:00
Peter Kampjes
5c4adfad8c
The last 2 code snippets shouldn't be runnable 2020-08-30 07:51:35 -03:00
joaquinelio
b10554806e
misplaced "too"? 2020-08-30 06:10:27 -03:00
Ilya Kantor
f830bc5d94
Merge pull request #2051 from redradist/patch-1
Update article.md with link to Brython
2020-08-27 23:38:57 +03:00
Ilya Kantor
e25ccf8d0f
Merge pull request #2044 from peachesontour/patch-4
Typos
2020-08-27 23:38:37 +03:00
Ilya Kantor
b07a1fefa0
Merge pull request #2030 from peachesontour/patch-3
Update article.md
2020-08-27 23:38:08 +03:00
Ilya Kantor
f885527a13
Merge pull request #2029 from peachesontour/patch-1
Typos
2020-08-27 23:37:30 +03:00
Ilya Kantor
32cf594e90
Merge pull request #2027 from lumosmind/patch-48
clarifying example code
2020-08-27 23:36:55 +03:00
Ilya Kantor
d1ac0c4583
Merge pull request #2053 from peachesontour/patch-6
Typos
2020-08-27 23:36:09 +03:00
Ilya Kantor
1bd9b9e9b0
Merge pull request #2054 from peachesontour/patch-7
The solution here had no break, an infinite loop. Modified to match plunker example code
2020-08-27 23:35:50 +03:00
Ilya Kantor
ba6ae24c61
Merge pull request #2058 from arcticmatt/array-patch
5.4 - change 7 basic types to eight basic types
2020-08-27 23:35:29 +03:00
Ilya Kantor
9646a67d99
Merge pull request #2062 from yasath/patch-1
Fixed "compatibility" spelling error
2020-08-27 23:34:41 +03:00
Ilya Kantor
ff470ec24a
Merge pull request #2067 from peachesontour/patch-8
Typos
2020-08-27 23:34:28 +03:00
Ilya Kantor
71988e17b0
Merge pull request #2069 from bookchiq/patch-1
Improve phrasing
2020-08-27 16:48:53 +03:00
Ilya Kantor
9007790f84
Merge pull request #2073 from joaquinelio/patch-1
once in -> once every
2020-08-27 16:48:36 +03:00
Ilya Kantor
f983992700
Merge pull request #2077 from sanghyo95/patch-1
add semicolon
2020-08-27 16:47:38 +03:00
Ilya Kantor
c28563b7c7
Merge pull request #2078 from moisheschwartz/patch-1
Removed the parts about browser compatibility
2020-08-27 16:47:17 +03:00
Ilya Kantor
d462c7eca1
Merge pull request #2082 from peachesontour/patch-9
Typos
2020-08-27 16:46:34 +03:00
Ilya Kantor
689b1c43fe
Merge pull request #2026 from ghost/patch-1
BigInt header grammar fix
2020-08-27 16:45:17 +03:00
Ilya Kantor
721cbed9db
Merge pull request #2086 from C17AN/patch-2
updated size unit from "kb" to "KB" - [#2085]
2020-08-27 15:55:14 +03:00
Chan-Min, Kim
2a6d552cbb
updated size unit from "kb" to "KB" - [#2085]
"kb" means "kilobit", some may confused about it.
so It'll be better to changed as "KB", as intended.
2020-08-27 10:33:17 +09:00
Ilya Kantor
c1b38c8b4f
Update article.md 2020-08-26 09:36:33 +03:00
Ilya Kantor
1190721cf7
Update article.md 2020-08-26 09:31:09 +03:00
Peter Kampjes
21b83a5685
Typos 2020-08-25 17:56:50 -03:00
Moses Schwartz
b946ee04c9
Removed the parts about browser compatibility
`globalThis` is now supported in all major browsers, see link https://caniuse.com/#search=globalThis
2020-08-24 10:33:22 -04:00
Ilya Kantor
b0c5dad519
Merge pull request #2076 from AasthaSinha2305/master
Explained how to create a date object.
2020-08-24 09:24:35 +03:00
sanghyo95
3b71f769a7
add semicolon
add semicolon 13,20 line
2020-08-24 08:54:34 +09:00
Aastha Sinha
37287af523
Update solution.md 2020-08-24 02:14:52 +05:30
Aastha Sinha
243a1d3276
Update solution.md 2020-08-23 18:06:06 +05:30
AasthaSinha2305
44bc57ee91 Date object explained clearly 2020-08-23 18:01:21 +05:30
joaquinelio
977cc0f92d
Update article.md 2020-08-22 21:20:03 -03:00
joaquinelio
938086674b
Update article.md 2020-08-22 21:00:37 -03:00
joaquinelio
a99254f7f7
once in -> once every 2020-08-22 20:20:05 -03:00
Ilya Kantor
b85413d0bd
Update task.md 2020-08-22 10:46:56 +03:00
Ilya Kantor
858b733ce0
Update task.md 2020-08-22 10:45:44 +03:00
Ilya Kantor
53f055c925
Merge pull request #2072 from josephrocca/patch-1
Remove Edge and Firefox warning
2020-08-21 10:23:36 +03:00
josephrocca
2c01903c9d
Remove Edge and Firefox warning
Supported in Edge 79 and Firefox 78
2020-08-21 11:23:42 +10:00
Sarah Lewis
bbaa75b59e
Improve phrasing 2020-08-18 16:28:35 -07:00
Ilya Kantor
fe571b36ed
Merge pull request #2066 from Violet-Bora-Lee/master
delete unused line
2020-08-16 23:05:26 +03:00
Peter Kampjes
4550b60560
Update article.md 2020-08-16 06:31:02 -03:00
Violet Bora Lee
665b97251c delete unused line 2020-08-16 17:27:21 +09:00
Ilya Kantor
b0624a189e minor fixes 2020-08-14 19:35:28 +03:00
Ilya Kantor
8eab7d6cc9 minor fixes 2020-08-14 19:34:16 +03:00
Ilya Kantor
9add5e76d5
Merge pull request #2065 from C17AN/patch-1
[Typo Correction] - "fetch" solution typo error
2020-08-14 17:10:55 +03:00
Chan-Min, Kim
43ff24e088
[Typo Correction] - "fetch" solution typo error
fixed typo - "arrray" to "array"
2020-08-14 23:09:57 +09:00
Ilya Kantor
665b8ebbba
Merge pull request #2063 from maksumi/patch-3
Update article.md
2020-08-14 08:42:13 +03:00
Maksumi Murakami
6615df4d58
Update article.md 2020-08-13 18:22:27 -05:00
Maksumi Murakami
bc92283021
Update article.md
Changes proposes for the [issue 2049](https://github.com/javascript-tutorial/en.javascript.info/issues/2049)
2020-08-13 17:39:47 -05:00
Yasath
a149bc0479
Fixed "compatibility" spelling error 2020-08-13 12:19:25 +01:00
Matt Lim
a6c9f30cb8 5.4 - change 7 basic types to eight basic types 2020-08-10 23:02:31 -07:00
Ilya Kantor
3a924fc1e8 minor fixes 2020-08-10 22:52:57 +03:00
Peter Kampjes
8a70b745f0
The solution here had no break, an infinite loop. 2020-08-09 20:39:19 -03:00
Peter Kampjes
fe12de8859
Typos 2020-08-09 20:33:39 -03:00
Ilya Kantor
fbf443e414 minor fixes 2020-08-09 21:03:34 +03:00
Ilya Kantor
2bf8a27fad minor fixes 2020-08-09 21:02:40 +03:00
Ilya Kantor
1cfd422270 minor fixes 2020-08-09 21:02:05 +03:00
Denis
0557a16f81
Update article.md
Added link to Brython Python transpiler to JavaScript
2020-08-09 20:25:22 +03:00
Peter Roche
8d13b7fb88
One more little phrasing change 2020-08-09 01:16:27 -06:00
Peter Roche
2aab98ac13
Merge pull request #2050 from javascript-tutorial/paroche-patch-19
Various minor syntax and punctuation changes
2020-08-09 01:10:07 -06:00
Peter Roche
4ff6eb4b78
Various minor syntax and punctuation changes 2020-08-09 01:03:29 -06:00
Ilya Kantor
1599dec142
Merge pull request #2047 from peachesontour/patch-5
Typos
2020-08-08 19:24:33 +03:00
Peter Kampjes
bb8fc43dd7
Typos 2020-08-08 11:53:50 -03:00
Ilya Kantor
d4fb59b2d8
Merge pull request #2046 from joaquinelio/patch-1
repeated word 2-3-6 article
2020-08-08 11:44:14 +03:00
joaquinelio
7b0d4773ce
repeated word 2020-08-08 04:24:02 -03:00
Peter Kampjes
beaf89f608
Typos 2020-08-07 22:56:07 -03:00
Ilya Kantor
7907cd667c minor fixes 2020-08-04 10:33:40 +03:00
Ilya Kantor
f0ad0bafa2 minor fixes 2020-08-04 10:30:25 +03:00
Ilya Kantor
fb4dda68e5 minor fixes 2020-08-04 10:30:13 +03:00
Ilya Kantor
d2f7d14288 minor fixes 2020-08-04 10:29:38 +03:00
Ilya Kantor
0e592a95c7 minor fixes 2020-08-04 10:29:29 +03:00
Ilya Kantor
4133532cd8 minor fixes 2020-08-04 10:29:19 +03:00
Ilya Kantor
0f7443b5df minor fixes 2020-08-04 09:25:45 +03:00
Ilya Kantor
0f391b2e2f
Update article.md 2020-08-03 08:15:53 +03:00
Ilya Kantor
cdf382de4c
Merge pull request #2031 from lumosmind/patch-49
refactoring
2020-07-30 01:13:27 +03:00
Mustafa Kemal Tuna
05e1878b3d
refactoring
more readable and more modern way
2020-07-30 00:32:44 +03:00
Peter Kampjes
ed78e2602d
Update article.md
Small fixes.
2020-07-26 21:35:32 -03:00
Peter Kampjes
1f5a40f4c1
Update article.md 2020-07-25 14:18:36 -03:00
Ilya Kantor
b0464bb32c
Merge pull request #2028 from peachesontour/patch-1
Typo
2020-07-25 13:25:38 +03:00
Peter Kampjes
dc0d9158b2
Typo
Thanks for a great tutorial!
2020-07-25 07:06:33 -03:00
Mustafa Kemal Tuna
7d0d65478d
clarifying example code
An interesting question may arise in the example above: what’s the value of this inside set fullName(value)? Where are the properties this.name and this.surname written: into user or admin?

The answer is simple: this is not affected by prototypes at all.

No matter where the method is found: in an object or its prototype. In a method call, this is always the object before the dot.

So, the setter call admin.fullName= uses admin as this, not user.

That is actually a super-important thing, because we may have a big object with many methods, and have objects that inherit from it. And when the inheriting objects run the inherited methods, they will modify only their own states, not the state of the big object.

The example code doesn't show these concepts. Also, these additions can make readers ask questions before the explanation of the example code.
2020-07-25 05:38:45 +03:00
Aiyo
f19c56b15d
BigInt header grammar fix 2020-07-24 10:22:22 +02:00
Ilya Kantor
8e1f438a5b
Merge pull request #1990 from lumosmind/patch-43
more definitive title
2020-07-23 23:09:25 +03:00
Mustafa Kemal Tuna
41766c939e
grammar fix 2020-07-23 22:31:55 +03:00
Mustafa Kemal Tuna
8f3831be1c
One line of code creates a lot of confusing
"// obj.toString === obj.__proto__.toString == Object.prototype.toString"
It is look like JS code but it gives different result from what we want to get.
There is different kind of equality operator ant these give more confusing what is the purpose of these?
It can be better to separate this line into 2 line of code to make it sensible and readable.
Subject and code is already hard but there is no need to make readers ask unnecessary questions.
2020-07-23 13:51:13 +03:00
Nguyễn Đức Hào
85b1e7aa34
Update article.md 2020-07-23 11:59:32 +07:00
Ilya Kantor
f38eb4e1b1
Merge pull request #2021 from lumosmind/patch-44
to make binding more clear
2020-07-21 21:32:20 +03:00
Mustafa Kemal Tuna
b70f9498d1
grammatical fix 2020-07-21 20:27:36 +03:00
Mustafa Kemal Tuna
4fdf4c3083
to make binding more clear
understanding "pre-bound value"  can be little bit hard.
2020-07-21 19:04:09 +03:00
LeviDing
c2f8c4fb9e
Update article.md 2020-07-18 23:32:51 +08:00
Ilya Kantor
ae1171069c
Merge pull request #1970 from rromanenko/patch-1
Update article.md
2020-07-18 14:16:30 +03:00
Ilya Kantor
668207b4c1
Merge pull request #1972 from dvdvdmt/patch-1
Fix a typo
2020-07-18 14:16:21 +03:00
Ilya Kantor
6acac10132
Merge pull request #1973 from akymtl/patch-1
Update article.md
2020-07-18 14:15:59 +03:00
Ilya Kantor
04c0570e22
Merge pull request #1974 from akymtl/patch-3
Update article.md
2020-07-18 14:15:51 +03:00
Ilya Kantor
5e74d7cbf6
Merge pull request #1975 from traxium/patch-1
Fix typo in /instanceof section (widow -> Window)
2020-07-18 14:15:42 +03:00
Ilya Kantor
83793dc968
Merge pull request #1976 from DanGhanbari/patch-1
update solution.md
2020-07-18 14:15:22 +03:00
Ilya Kantor
86222ff911
Merge pull request #1978 from peachesontour/patch-2
Typos
2020-07-18 14:14:46 +03:00
Ilya Kantor
918947e129
Merge pull request #1980 from liuernan/patch-1
a little confused by this description
2020-07-18 14:14:32 +03:00
Ilya Kantor
e251f05e58
Merge pull request #1983 from lumosmind/patch-40
is 'if' operator?
2020-07-18 14:12:58 +03:00
Ilya Kantor
67e54bf269
Merge pull request #1984 from SakiPgr/patch-1
Corrected a typo
2020-07-18 14:12:44 +03:00
Ilya Kantor
80f76533e1
Merge pull request #1987 from pushpend3r/patch-1
Typo mistake
2020-07-18 14:11:41 +03:00
Ilya Kantor
5641b170d2
Merge pull request #1989 from siddharth-golchha/patch-1
Fixed Typo
2020-07-18 14:11:28 +03:00
Ilya Kantor
83c01f4be2
Merge pull request #1993 from shubham-maurya/patch-1
Update article.md
2020-07-18 14:10:50 +03:00
Ilya Kantor
a896d3c009
Merge pull request #1995 from leviding/patch-14
Fix error of BigInt
2020-07-18 14:10:39 +03:00
Ilya Kantor
c1767e7f5a
Merge pull request #1996 from smakhl/patch-1
Correct message in sandbox.view iframe
2020-07-18 14:10:07 +03:00
Ilya Kantor
4716d10dab
Merge pull request #1997 from leviding/patch-15
Fix typo error: delete a blank
2020-07-18 14:09:57 +03:00
Ilya Kantor
6e0944aeb1
Merge pull request #1999 from zhang1pr/master
Fix a comment
2020-07-18 14:09:20 +03:00
Ilya Kantor
b4dfc5d4ec
Merge pull request #2000 from DaliborP/patch-1
8.4  Prototype methods... - Fix code typo
2020-07-18 14:08:45 +03:00
Ilya Kantor
859fc13f26
Merge pull request #2001 from haond10adp/master
typo
2020-07-18 14:08:30 +03:00
Ilya Kantor
1f6b1c77d8
Merge pull request #2003 from m47h4r/minor-fix-nullish-coalescing-operator
minor fix: precedence is 5 according to MDN
2020-07-18 14:08:18 +03:00
Ilya Kantor
ffbf1a8dd8
Merge pull request #2010 from leviding/patch-17
Now _.bindAll(object, methodNames) must specify methodNames
2020-07-18 14:07:06 +03:00
Ilya Kantor
df9effe06c
Merge pull request #2011 from Pankajtanwarbanna/patch-1
Browser LocalStorage capacity updated to 5 MB.
2020-07-18 14:06:57 +03:00
Ilya Kantor
b9477777ba
Merge pull request #2012 from leviding/patch-18
Fix minor typo error: ol number
2020-07-18 14:06:40 +03:00
Ilya Kantor
55f825c3af
Merge pull request #2013 from leviding/patch-19
Fix minor typo error: add ol number
2020-07-18 14:06:32 +03:00
Ilya Kantor
841d7504e4
Merge pull request #2014 from leviding/patch-20
Fix minor typo error: change when when to when
2020-07-18 14:06:24 +03:00
Ilya Kantor
3558415261
Merge pull request #1977 from peachesontour/patch-1
Typos
2020-07-18 14:05:58 +03:00
LeviDing
6800c2ac4b
Update index.html 2020-07-18 16:51:56 +08:00
LeviDing
d0474aea6f
Update article.md 2020-07-18 16:12:22 +08:00
LeviDing
0d497c7b34
Update article.md 2020-07-18 15:55:54 +08:00
LeviDing
356d5278cd
Fix minor typo error: change when when to when 2020-07-18 15:38:36 +08:00
LeviDing
7480a24c25
Fix minor typo error: add ol number 2020-07-18 13:17:18 +08:00
LeviDing
dfcacf2d82
Fix minor typo error: ol number 2020-07-18 12:16:23 +08:00
Pankaj Tanwar
0b7266da47
Browser LocalStorage capacity updated to 5 MB. 2020-07-17 21:40:25 +05:30
LeviDing
de13fafd1b
Update bindAll of lodash 2020-07-17 14:11:01 +08:00
Peter Roche
72482bc435
Update article.md
Revision to unary plus not allowed bigints description in response to PR
2020-07-16 10:20:25 -06:00
Ilya Kantor
c3a11c85e5
Merge pull request #2004 from leviding/patch-16
Change equality sign `=` to equality sign `==`
2020-07-12 16:21:12 +03:00
Ilya Kantor
1f0fcb7de6 minor fixes 2020-07-12 16:20:39 +03:00
Ilya Kantor
9e59ec101f
Merge pull request #2005 from leviding/patch-17
Fix some confusing expression in chapter of optional chaining
2020-07-12 16:04:04 +03:00
LeviDing
450612a09e
Fix some confusing expression 2020-07-12 18:45:38 +08:00
LeviDing
abfa6dc1fe
Change equality sign = to equality sign == 2020-07-12 18:33:50 +08:00
Mazhar Zandsalimi
56edf4ac5b
minor fix: precedence is 5 according to MDN 2020-07-11 13:27:49 +04:30
Nguyễn Đức Hào
15214dce44
Update article.md 2020-07-10 15:16:20 +07:00
Dalibor Pasalic
38526232a6
8.4 Prototype methods... - Fix code typo
Move comma before square bracket
Object.create(proto[, descriptors])
2020-07-10 08:32:18 +02:00
Chao Zhang
9e3065f6ae Fix a comment 2020-07-09 15:48:36 -04:00
LeviDing
23fb044973
Update task.md 2020-07-07 20:18:26 +08:00
Sergei Makhlonov
1ad3c2c339
Correct message in sandbox.view iframe 2020-07-07 13:02:50 +03:00
LeviDing
8a9f440547
Fix error of BigInt 2020-07-06 15:17:06 +08:00
Shubham Maurya
d9ab352ed8
Update article.md
Minor edit around example code: " should be around id
2020-07-05 23:18:37 +05:30
Ilya Kantor
445bda3980 minor fixes 2020-07-05 15:52:10 +03:00
Ilya Kantor
0edc6518de minor fixes 2020-07-05 12:45:21 +03:00
Mustafa Kemal Tuna
5ac51835a7
more definitive title
There are also array literals and string literals.
2020-07-04 18:34:34 +03:00
Siddharth Golchha
f0dbc65f53
Fixed Type 2020-07-03 18:53:01 -07:00
Pushpender
eb49cb9345
Type mistake
Used "unitialized" instead of "uninitialized"
2020-07-02 23:18:39 +05:30
Ilya Kantor
26bf51af3e minor fixes 2020-07-02 14:26:08 +03:00
Ilya Kantor
94c8fcb248 minor fixes 2020-07-02 14:24:52 +03:00
Dratzidis Athanasios
3eb13d5ef8
Corrected a typo 2020-07-02 05:55:23 +03:00
Mustafa Kemal Tuna
ad0dd99b62
is 'if' operator?
The title makes me ask "is 'if' keyword operator or not?".
I think 'if' is not operator because it does not return any value and it is called if-statement.
2020-07-01 18:19:32 +03:00
Ilya Kantor
ea3d179622
Merge pull request #1981 from leviding/patch-13
Fix minor typo error: delete blank
2020-07-01 11:57:51 +03:00
Ilya Kantor
da9849d61a fixes #1979 2020-07-01 11:54:48 +03:00
LeviDing
db102cbf89
Fix minor typo error: delete blank 2020-07-01 16:18:46 +08:00
刘二男
3e2309cb9b
Update article.md 2020-07-01 14:37:59 +08:00
peachesontour
de2542378f
Typos 2020-06-29 21:26:07 -03:00
peachesontour
74caa865f3
Typos
2 small fixes
2020-06-29 21:22:47 -03:00
DanGhanbari
01e584fc81
update solution.md
There are some missing "=" sign according to the question.
2020-06-28 23:30:03 +01:00
traxium
41a1b92919
Fix typo in /instanceof section (widow -> Window) 2020-06-28 12:46:59 +07:00
Ilya Kantor
340ce43421 minor fixes 2020-06-27 21:54:32 +03:00
Akshay Mittal
1b1b07edac
Update article.md
minor typo fix
2020-06-28 00:24:10 +05:30
Akshay Mittal
97a12c4d96
Update article.md
minor type fixes
2020-06-27 23:46:46 +05:30
Ilya Kantor
b3fbb9c9f4 minor fixes 2020-06-27 12:57:42 +03:00
Ilya Kantor
7b42ecceee minor fixes 2020-06-27 12:56:32 +03:00
Dmitriy Davydov
4044b75381
Fix typo
without -> with
2020-06-27 10:01:42 +05:00
Roman Romanenko
edfe300d80
Update article.md
Fixing a typo
2020-06-23 17:47:41 +03:00
Ilya Kantor
ef2760eb86 minor fixes 2020-06-22 19:41:24 +03:00
Ilya Kantor
dde5fed4bd minor fixes 2020-06-22 19:41:24 +03:00
Peter Roche
e4e6a50b57
'where finds it and changes' -> 'where it finds and changes it'
Was tempted to suggest something a bit wordier: "where it finds it and, in this case, changes it", but I thought this would do.
2020-06-21 03:51:06 -06:00
Peter Roche
1f7b137e64
'since this moment' -> 'from this point forward' 2020-06-21 03:26:05 -06:00
Ilya Kantor
c75f66a895
Merge pull request #1967 from joachimklug/issue/#1966
Correct misspelling retarteted -> retargeted
2020-06-21 10:08:51 +03:00
Joachim Klug
a45788bb26
Correct misspelling retarteted -> retargeted
Fixes javascript-tutorial/en.javascript.info#1966
2020-06-21 08:37:25 +02:00
Ilya Kantor
2f80cb7eb0
Merge pull request #1964 from rizkyzhang/patch-4
Fix typo
2020-06-20 09:12:52 +03:00
Rizky
15d638e8d9
Fix typo
followed -> followed by
2020-06-20 03:34:45 +00:00
Ilya Kantor
531864a3a8
Merge pull request #1957 from chanjsq/patch-1
Add bottom and right properties for getCoords()
2020-06-16 19:42:07 +03:00
Ilya Kantor
f1da3ee136
Merge pull request #1962 from aadijoshi/patch-1
Set fake timers before calling throttle
2020-06-16 19:37:29 +03:00
aadijoshi
393f1ce33d
Set fake timers after calling throttle
Calling throttle before setting the fake timers will break any implementations that save a timestamp outside the wrapper function.
2020-06-16 18:51:17 +05:30
Ilya Kantor
0ef2dd3ae4
Merge pull request #1956 from Logan-Schelly/testcases/function-object-5
Testcases/function object 5
2020-06-16 09:14:54 +03:00
Logan Schelly
267e825560 Made the test cases easier to read. 2020-06-15 15:13:01 -06:00
Ilya Kantor
2e575af300
Merge pull request #1959 from xehpuk/patch-1
Fixed onupgradeneeded handling
2020-06-15 19:06:27 +03:00
xehpuk
c13f21d65e
Fixed onupgradeneeded handling
`openRequest.result.version` in `onupgradeneeded` is not the current DB version. It is the requested version, equal to `event.newVersion`. `event.oldVersion` contains the current version.
2020-06-15 17:24:39 +02:00
Ilya Kantor
a9925f4917 minor fixes 2020-06-15 14:54:44 +03:00
Ilya Kantor
64b0ff3949
Merge pull request #1958 from LuiGee3471/unicode-property
Fixed Wikipedia link and list markdown
2020-06-15 14:50:31 +03:00
Ilya Kantor
42b0220680 minor fixes 2020-06-15 14:49:46 +03:00
LuiGee3471
d3ef0d544f Fixed Wikipedia link and list markdown 2020-06-15 11:15:53 +09:00
华晨
1358b5e70f
Add bottom and right properties for getCoords()
The `createMessageUnder()` function below needs the `bottom` coordinate, but it doesn't in the result of `getCoords()`.
2020-06-13 15:36:48 +08:00
Logan Schelly
8e861596d7 Merge branch 'master' of https://github.com/javascript-tutorial/en.javascript.info into testcases/function-object-5 2020-06-10 15:40:04 -06:00
Logan Schelly
e5fe4a08bd Got rid of excessive newlines in task/sum-many-brackets sandbox code. 2020-06-10 15:38:18 -06:00
Logan Schelly
f20fb43f70 Add test case/sandbox for 1-js/06-advanced-functions/06-function-object/5-sum-many-brackets
I used the solution and examples already in the article.
I chose to make the test cases use Array.reduce() to compute the sum,
instead of hard-coding the answer myself.
Not sure how good of practice that is.
2020-06-10 15:29:06 -06:00
Ilya Kantor
b52aa942a8 minor fixes 2020-06-09 13:56:25 +03:00
Ilya Kantor
cd9c81cb79
Merge pull request #1947 from dharohar-rathore/master
Grammar and typo fix in pointer events
2020-06-08 11:08:37 +03:00
Ilya Kantor
21115c84fc
Merge pull request #1948 from diegotc86/patch-1
Match the solution with the question on "Type conversions" task
2020-06-08 11:08:14 +03:00
Ilya Kantor
f5a3f379a4 minor fixes 2020-06-08 11:07:46 +03:00
Ilya Kantor
c2c080ed8e minor fixes 2020-06-08 11:04:16 +03:00
Ilya Kantor
675861b93b
Merge pull request #1945 from Logan-Schelly/testcases/closure-9
Add test cases for 1-js/06-advanced-functions/03-closure/9-sort-by-field
2020-06-08 11:01:38 +03:00
Ilya Kantor
bba7892523
Merge pull request #1944 from michaelborn/patch-1
Grammar fix: Missing "is" in websocket EN article
2020-06-08 11:00:53 +03:00
Ilya Kantor
344993dd0b
Merge pull request #1941 from GabrieleC/master
fixed wrong formatting
2020-06-08 10:59:44 +03:00
Ilya Kantor
30c9c32cd7 minor fixes 2020-06-08 10:59:06 +03:00
Ilya Kantor
cea9d8c9c2 minor fixes 2020-06-08 10:55:41 +03:00
Ilya Kantor
0e1cdaad24
Merge pull request #1950 from diegotc86/patch-2
Update phrasing on "Comparison with ||"
2020-06-08 10:54:39 +03:00
Ilya Kantor
d35baee32d closes #1949 2020-06-07 18:57:32 +03:00
Diego Torres
d90b204f78
Update phrasing on "Comparison with ||"
The phrase `zero becames 100.` make me think that there is a variable `zero` defined when there is not.
2020-06-06 23:18:49 -05:00
Diego Torres
d5c3ac938f
Match the solution with the question on task.md
On task.md, " -9  " has 2 white spaces before "-9".
2020-06-06 21:36:55 -05:00
Ilya Kantor
020f2ea5e2
Merge pull request #1946 from syncopika/master
remove a stray 's' that caused an error in ball drag example
2020-06-06 12:26:15 +03:00
Dharohar Rathore
b8fbd23c7b Grammar and typo fix in pointer events 2020-06-06 12:49:10 +05:30
nicholas hung
76bc708cc3 remove a stray 's' that caused an error in ball drag example 2020-06-05 22:21:15 -04:00
Logan Schelly
a0383c07c0 Add test cases for 1-js/06-advanced-functions/03-closure/9-sort-by-field
Just a simple check to see if the code works on the example given in the task.
2020-06-04 23:07:25 -06:00
Michael Born
15a20a62da
Grammar fix: Missing "is" in websocket EN article
The english websocket article was missing an "in". I fixed it for you. :)
2020-06-03 11:18:56 -04:00
Gabriele Coletta
65eefe0187 fixed wrong formatting 2020-06-02 11:57:57 +02:00
Ilya Kantor
ecfcff24a4
Merge pull request #1928 from tiagocastro070/google-js-guide
google js guide link
2020-06-01 09:59:37 +03:00
Ilya Kantor
7b59734d5f typo 2020-06-01 09:59:03 +03:00
Ilya Kantor
a701341f82
Merge pull request #1932 from tmollov/master
Fix for Issue #1866
2020-06-01 09:57:44 +03:00
Ilya Kantor
1b2a192f28 minor fixes 2020-06-01 09:55:46 +03:00
Ilya Kantor
5cd131403e minor fixes 2020-06-01 09:55:35 +03:00
Ilya Kantor
d6a3bd1da1 minor fixes 2020-06-01 09:47:29 +03:00
Ilya Kantor
ab93cee5b9 minor fixes 2020-06-01 09:47:07 +03:00
Ilya Kantor
9cb597e229 minor fixes 2020-06-01 09:46:43 +03:00
Ilya Kantor
8f2ae7eb20 fixes #1931 2020-06-01 09:43:55 +03:00
Ilya Kantor
479c7f908a fixes #1935 2020-06-01 09:16:59 +03:00
Tundzhay Mollov
ad0a5b32c0
Fix for Issue #1866
https://github.com/javascript-tutorial/en.javascript.info/issues/1866
2020-05-31 19:47:55 +03:00
Ilya Kantor
69e44506c3 minor fixes 2020-05-31 17:19:32 +03:00
Alexey Pyltsyn
075266e251
Update article.md 2020-05-30 20:33:51 +03:00
Tiago Castro
fef7155cd3 google js guide link 2020-05-28 09:52:41 +01:00
Ilya Kantor
cd2c7ce3c8
minor 2020-05-28 11:07:34 +03:00
Ilya Kantor
d36675ed33 minor fixes 2020-05-27 14:42:30 +03:00
Ilya Kantor
8c5fa3a871 minor fixes 2020-05-27 14:41:31 +03:00
Ilya Kantor
4a22c9896b
Merge pull request #1926 from ironsoul0/patch-1
Details on cross-origin requests & credentials
2020-05-27 11:52:08 +03:00
Ilya Kantor
e1b44e8012 Merge pull request #1927 from kumarvaibhav45/patch-1
fixed typos
2020-05-27 11:51:32 +03:00
Ilya Kantor
9141a274bb
Merge pull request #1922 from GabrieleC/master
Fix typo
2020-05-27 11:45:40 +03:00
Kumar Vaibhav
4fe42ddb74
fixed typos 2020-05-26 15:20:30 +05:30
leeyc0
cf64a7908e
Update article.md 2020-05-26 09:36:33 +08:00
leeyc0
b21675ad04
Update article.md 2020-05-26 09:25:38 +08:00
leeyc0
289833c57d
Change to Tao Te Ching 2020-05-26 09:25:19 +08:00
Temirzhan Yussupov
46daea1596
Details on cross-origin requests & credentials
Cross-origin requests initiated by embedded images and forms actually bring cookies by default. Though it is incorrect to say that all cross-origin requests do not bring credentials by default.
2020-05-25 13:09:14 +06:00
GabrieleC
8613348076
Fix typo 2020-05-23 20:37:30 +02:00
Ilya Kantor
0da5b2b68c
Merge pull request #1920 from ekira/patch-1
fixed grammar
2020-05-23 19:17:47 +03:00
Ilya Kantor
3623cc2aed
Merge pull request #1917 from Logan-Schelly/master
Fixed typos on last Array Methods task.
2020-05-23 19:16:16 +03:00
Ilya Kantor
e7e0fc83f9
Merge pull request #1915 from desevoker/patch-1
Remove duplicate word "soon"
2020-05-23 19:16:00 +03:00
Ilya Kantor
43a2b02e4f
Merge pull request #1914 from ZYinMD/patch-2
correct minor error: "имя" is used in place of "name"
2020-05-23 19:15:44 +03:00
Ilya Kantor
388903889c
Merge pull request #1912 from ZYinMD/patch-1
correct minor error
2020-05-23 19:15:23 +03:00
Antony ekirapa
bdd936f339
fixed grammar 2020-05-23 12:11:46 +03:00
Logan-Schelly
333cb9defc
Fixed minor typos
The empty users array was undeclared in the second test, and the object in the first test was missing a comma in its declaration.
2020-05-21 14:12:51 -06:00
Logan-Schelly
77cb06d6ac
Fixed a comment, to reflect changes in the task.
The task has a test with a missing comma.  That same comma is missing in the comment, so I'm putting it here as well.
2020-05-21 14:10:21 -06:00
Ilya Kantor
4267d22a80 minor fixes 2020-05-21 13:42:14 +03:00
Dmytro Hrynchyi
4e67c0f055
Remove duplicate word "soon" 2020-05-19 22:55:53 +03:00
Zhi Yin
787409b30e
correct minor error: "имя" is used in place of "name" 2020-05-19 14:54:36 -04:00
Ilya Kantor
7fc037f8f3 minor fixes 2020-05-18 17:22:10 +03:00
Ilya Kantor
14eb62cd5f minor fixes 2020-05-18 17:21:29 +03:00
Ilya Kantor
6c6d5a4478 minor fixes 2020-05-18 09:33:59 +03:00
Ilya Kantor
fc8efbf5d5 closes #1909 2020-05-18 09:12:07 +03:00
Zhi Yin
fef45af6da
correct minor error 2020-05-17 22:08:32 -04:00
leeyc0
9e678daf95
Update article.md 2020-05-18 09:29:24 +08:00
leeyc0
16273f9428
Update article.md 2020-05-18 09:29:04 +08:00
Ilya Kantor
873e5f77d9
Merge pull request #1908 from kiniggit/map_set_grammar
grammar fix: a plain object
2020-05-18 00:02:17 +03:00
Ilya Kantor
c9d84ac595
Merge pull request #1905 from kiniggit/master
minor grammar mistake
2020-05-18 00:00:06 +03:00
Ilya Kantor
da1d600ecd minor fixes 2020-05-17 23:59:55 +03:00
Ilya Kantor
7ef7c5ebf7
Merge pull request #1903 from mattbaker-digital/master
Add additional error type-checking examples and use `instanceof` in examples
2020-05-17 23:47:37 +03:00
Ilya Kantor
b18ae204b1 closes #1897 2020-05-17 23:45:42 +03:00
Ilya Kantor
9353a04156
Merge pull request #1894 from mKawi/patch-1
Fix Typo in logical operators
2020-05-17 23:44:44 +03:00
Ilya Kantor
8a0058d6e0 closes #1882 2020-05-17 23:44:21 +03:00
Ilya Kantor
c331e443d8
Merge pull request #1880 from RyanAmeri/master
Updated to show Edge now supports BigInt
2020-05-17 20:23:09 +03:00
kiniggit
ec77f84741 grammar fix: a plain object 2020-05-16 17:26:56 -03:00
leeyc0
3cab2774f7
Confucius never said black cat quote
Confucius never said anything about black cat

Ref: https://www.washingtonpost.com/world/2019/03/25/chinese-proverb-that-russia-cited-respond-mueller-report-does-not-appear-be-chinese-proverb/
2020-05-16 23:56:01 +08:00
kiniggit
befe535602
Update task.md
minor grammar mistake "it's original" should be "its original"
2020-05-16 00:19:22 -03:00
Matt Baker
d9d1cfe744 Add additional error type-checking examples and use instanceof in later examples 2020-05-15 17:52:48 +01:00
Ilya Kantor
aabbec16cc minor fixes 2020-05-11 10:31:59 +03:00
Ilya Kantor
c056a19c91 minor fixes 2020-05-10 00:54:37 +03:00
Ilya Kantor
cca469b22d renumber 2020-05-10 00:39:33 +03:00
Ilya Kantor
5d3aa7ff54 event.button 2020-05-10 00:38:54 +03:00
Ilya Kantor
6e1e244c97 pointer api 2020-05-10 00:38:54 +03:00
Ilya Kantor
db789a0b7f minor 2020-05-10 00:38:54 +03:00
Ilya Kantor
a9e5ed552d minor rephrasings 2020-05-10 00:38:54 +03:00
Alexey Pyltsyn
681ef7bf48
Merge pull request #1879 from traxium/steps
Fix typo in css-animations section
2020-05-09 23:01:27 +03:00
Alexey Pyltsyn
4927d7a792
Merge pull request #1895 from Aakodal/patch-2
Adding missing 'pattern:'
2020-05-09 23:00:34 +03:00
Alexey Pyltsyn
3cefe910aa
Merge pull request #1885 from rjlardizabal/patch-1
Update article.md
2020-05-09 22:59:15 +03:00
Alexey Pyltsyn
681b4fde46
Merge pull request #1891 from vin18/patch-1
fixing a typo on line 7
2020-05-09 22:58:31 +03:00
Alexey Pyltsyn
ebd9a2c91b
Merge pull request #1878 from leviding/patch-12
Fix minor typo error
2020-05-09 22:57:54 +03:00
Alexey Pyltsyn
2bd28fe621
Merge pull request #1881 from thediveshsoni/patch-1
Typo Error in Description of "alert"
2020-05-09 22:57:05 +03:00
Alexey Pyltsyn
2f400a5ecc
Merge pull request #1887 from shubham08gupta/patch-1
remove duplicate words
2020-05-09 22:56:38 +03:00
Alexey Pyltsyn
62edeb79b1
Merge pull request #1896 from pedrogpimenta/patch-1
Fix a small text typo
2020-05-09 22:55:48 +03:00
Pedro Pimenta
0bc8ab6aa2
Fix a small text typo 2020-05-09 00:27:26 +02:00
Aakodal
e20b1a4843
Adding missing 'pattern:'
Adding missing 'pattern:' next to 'm' in the line "Without the flag `m`"
2020-05-08 19:54:28 +00:00
Moudi Kawi
f9ad7195e0
Fix Typo in logical operators
true || alert("printed")
false || alert("not printed") 

This is confusing to a student as the first won't be printed, but the second will print "not printed". I've reversed it to this so it makes much more sense to a learner:

true || alert("not printed")
false || alert("printed")
2020-05-08 16:56:08 +01:00
Ilya Kantor
24224dc2ec
Merge pull request #1893 from vin18/patch-2
fixing a typo on line 431
2020-05-08 00:17:30 +03:00
Vinit Raut
fe78701dcd
fixing a typo on line 431
added changes from 'numebers' to 'numbers' on line 431
2020-05-08 02:22:29 +05:30
Vinit Raut
6b927fc389
fixing a typo on line 7
Correcting spelling from 'exampple' to 'example'.
2020-05-07 21:33:26 +05:30
Ilya Kantor
c799f28d2e minor fixes 2020-05-06 23:36:02 +03:00
Ilya Kantor
83c07e100a minor fixes 2020-05-06 23:34:02 +03:00
Ilya Kantor
08309a07f6 minor fixes 2020-05-06 23:24:22 +03:00
Ilya Kantor
6cf15b78bc minor fixes 2020-05-06 23:23:31 +03:00
Ilya Kantor
9bd640c414 minor fixes 2020-05-06 23:22:40 +03:00
Ilya Kantor
fc2ba214e8 minor fixes 2020-05-06 23:22:14 +03:00
Ilya Kantor
df6f6be420 minor fixes 2020-05-06 23:21:13 +03:00
Ilya Kantor
3440a4eb80 minor fixes 2020-05-06 23:19:55 +03:00
Ilya Kantor
0444de2a00 minor fixes 2020-05-06 22:46:26 +03:00
Ilya Kantor
458493781f minor fixes 2020-05-06 20:57:42 +03:00
Ilya Kantor
844b96a821 fix debounce 2020-05-06 20:35:58 +03:00
Ilya Kantor
80f2becc95 fix debounce 2020-05-06 20:29:17 +03:00
Ilya Kantor
cd5a7e451f fix debounce 2020-05-06 20:27:34 +03:00
Ilya Kantor
ba2b7b0c4a minor 2020-05-06 16:51:47 +03:00
Ilya Kantor
405032ef32
Merge pull request #1890 from Violet-Bora-Lee/master
minor fixes
2020-05-06 11:21:18 +03:00
Violet Bora Lee
b782700818 minor fixes 2020-05-06 17:10:53 +09:00
Peter Roche
2289134483
Merge pull request #1884 from matjax/master
small phrase change
2020-05-05 16:04:56 -06:00
Ilya Kantor
ac03836302
Merge pull request #1888 from Violet-Bora-Lee/master
minor fixes
2020-05-05 19:04:21 +03:00
Violet Bora Lee
b4910970c2 minor fixes 2020-05-05 22:27:01 +09:00
Matt Jackson
fd45b7fdc5 apostrophe 2020-05-05 11:46:52 +01:00
Matt Jackson
ea397041e0 small phrase change 1.1 2020-05-05 11:42:11 +01:00
Shubham
6853f6ab78
remove duplicate words 2020-05-05 19:01:06 +09:00
rjlardizabal
a211fc9236
Update article.md 2020-05-05 19:25:20 +12:00
Matt Jackson
a5f6a988bc small phrase change 2020-05-04 14:45:28 +01:00
Ilya Kantor
c2ce2d4cbd minor fixes 2020-05-04 10:49:39 +03:00
Ilya Kantor
b057341f6c refactor objects, add optional chaining 2020-05-03 16:56:24 +03:00
Peter Roche
09a964e969
'somewhy' -> 'for some reason it'
I had to look this up, not recalling having heard "somewhy" before. It's clear what it means, but is not a word in American English (though apparently it is used in British English, at least sometimes). Maybe should be a word, but somewhy it isn't.
2020-05-02 16:23:56 -06:00
Ilya Kantor
e111aa1e90 minor improvements 2020-05-03 00:59:05 +03:00
Divesh Soni
0835b11dd2
Update article.md
Repeated word in the description of alert
2020-05-02 23:11:29 +05:30
Ilya Kantor
8a13c992d6 Add nullish coalescing to multiple articles, refactor operators, renumber the chapter 2020-05-02 17:37:12 +03:00
RyanAmeri
5a6be36ee8
Updated to show Edge now supports BigInt 2020-05-02 07:29:23 +10:00
traxium
29ac929458
Fix typo in css-animations
step -> steps
2020-05-01 10:45:14 +07:00
LeviDing
9c2cb1bf02
Fix minor typo error 2020-05-01 11:39:53 +08:00
Ilya Kantor
175aefa0b8 minor fixes 2020-04-30 10:23:50 +03:00
Ilya Kantor
3a3086b0e0 minor fixes 2020-04-29 15:55:45 +03:00
Ilya Kantor
ef714886a4
Merge pull request #1859 from wonderingabout/trick-swap-variables
trick: use array destructuring to swap variables
2020-04-29 15:51:34 +03:00
wonderingabout
da161590f4 trick: use array destructuring to swap variables
source: https://www.typescriptlang.org/docs/handbook/variable-declarations.html#array-destructuring
2020-04-29 13:29:15 +02:00
Ilya Kantor
889913d2df
Merge pull request #1844 from leviding/patch-3
Fix typo error
2020-04-29 12:05:15 +03:00
Ilya Kantor
e1469e337c
Merge pull request #1847 from leviding/patch-5
Fix typo error
2020-04-29 12:04:39 +03:00
Ilya Kantor
ba88b60f63 closes #1852 2020-04-29 12:04:07 +03:00
Ilya Kantor
f0bd80c5ce
Merge pull request #1853 from leviding/patch-6
Fix minor typo error
2020-04-29 12:02:15 +03:00
Ilya Kantor
3543d6d008
Merge pull request #1855 from leviding/patch-7
Fix minor typo error
2020-04-29 12:02:04 +03:00
Ilya Kantor
839e375198
Merge pull request #1856 from leviding/patch-8
Fix minor typo error
2020-04-29 12:01:55 +03:00
Ilya Kantor
2f61147a03
Merge pull request #1857 from leviding/patch-9
Fix minor typo error
2020-04-29 12:01:44 +03:00
Ilya Kantor
2ae82616b9
Merge pull request #1858 from leviding/patch-10
Fix: change responseText to response
2020-04-29 12:01:32 +03:00
Ilya Kantor
1d104228b4
Merge pull request #1861 from leviding/patch-11
Fix minor typo error
2020-04-29 11:58:34 +03:00
Ilya Kantor
649ecc5bb8 closes #1864 2020-04-29 11:58:16 +03:00
Ilya Kantor
fbd6c8a6b4
Merge pull request #1750 from galunni/patch-1
Update article.md
2020-04-29 11:57:33 +03:00
Ilya Kantor
6ead9afdc4
Merge pull request #1868 from baooab/patch-8
delete extra content
2020-04-29 11:14:18 +03:00
Ilya Kantor
85645083ae
Merge pull request #1874 from bryik/patch-1
Remove unnecessary "to"
2020-04-29 11:13:42 +03:00
Ilya Kantor
f2a099bd0b
Merge pull request #1877 from janina213/patch-1
add break to switch case example
2020-04-29 11:13:01 +03:00
Janina
ec9ae12900
add break to number case 2020-04-28 18:06:12 -07:00
Ben Pyrik
00cc80240a
Remove unnecessary "to" 2020-04-25 19:16:45 -05:00
Peter Roche
d65141d44b
That's a getter/setter for it -> It's a getter/setter for it 2020-04-22 17:34:59 -06:00
zhangbao
641dd56f70
delete extra content 2020-04-21 11:24:15 +08:00
Alexey Pyltsyn
37107f74ae
Merge pull request #1845 from baooab/patch-7
fix typo
2020-04-18 12:09:26 +03:00
LeviDing
e8dcfd19ff
Update article.md 2020-04-13 10:51:00 +08:00
Peter Roche
71120d5968
Various small wording and punctuation changes 2020-04-11 23:17:53 -06:00
LeviDing
3ffab4692e
Update article.md 2020-04-11 16:16:06 +08:00
LeviDing
0bf13ec4b3
Update article.md 2020-04-10 18:33:22 +08:00
Peter Roche
2a01424797
chapter -> article (3x) 2020-04-09 23:27:23 -06:00
LeviDing
8090aa6e72
Update article.md 2020-04-09 21:22:04 +08:00
LeviDing
1e092a87de
Update article.md 2020-04-09 15:06:58 +08:00
LeviDing
ec9c76c6be
Update article.md 2020-04-09 11:29:51 +08:00
LeviDing
ee6998127a
Update article.md 2020-04-06 12:18:47 +08:00
Ilya Kantor
c89ddc5d92
Merge pull request #1751 from u-n-known/patch-1
Either quotation marks or italicization
2020-04-05 18:34:55 +03:00
zhangbao
59d791b9d1
fix typo
1. then we don't need Array.from, разумеется, не нужен. -> then we don't need Array.from any more.
2. delete the extra table header
2020-04-05 22:07:27 +08:00
Ilya Kantor
23ffde7806 minor fixes 2020-04-04 15:15:09 +03:00
Ilya Kantor
2acd2584d7 minor fixes 2020-04-04 15:12:23 +03:00
Ilya Kantor
5a9b8a4cc5 up 2020-04-04 15:08:47 +03:00
LeviDing
b82443d6b2
Update article.md 2020-04-04 16:40:05 +08:00
Ilya Kantor
09404a069e
Merge pull request #1840 from Ahmed-Magdy-S/patch-2
fix minor typo
2020-04-03 18:53:43 +03:00
Ilya Kantor
f33dc7e685
Merge pull request #1841 from SambaLim/master
Change switch Grouping of "case" example
2020-04-03 18:53:31 +03:00
Sambalim
0287fbd362 Change switch Grouping of "case" example
Change switch Grouping of "case" example
2020-04-03 08:40:17 +09:00
Ahmed Magdy Seleem
81a63cfdb7
fix minor typo
"synctax" to "syntax"
2020-04-03 01:35:49 +02:00
Ilya Kantor
d84673a6ec closes #1810 2020-04-03 02:06:31 +03:00
Ilya Kantor
a55b99cc5f fixes #1836 2020-04-03 01:54:22 +03:00
Ilya Kantor
6f45ce77c9
Merge pull request #1809 from leviding/patch-4
Add bigint to 1-js/02-first-steps/17-javascript-specials/article.md
2020-04-03 01:50:47 +03:00
Ilya Kantor
5049c0b7d5
Merge pull request #1830 from wonderingabout/add-js-formatting
fix missing js formatting
2020-04-03 01:50:27 +03:00
Ilya Kantor
cd2d450b7b
Merge pull request #1834 from Aakodal/patch-1
Fixing "sum(1)" instead of "curriedSum(1)" (l. 42)
2020-04-03 01:50:10 +03:00
Ilya Kantor
368cc06594
Merge pull request #1837 from leviding/patch-1
Fix minor type error
2020-04-03 01:49:46 +03:00
Ilya Kantor
fde6d43c26
Merge pull request #1838 from Ahmed-Magdy-S/patch-1
fix an anchor link error
2020-04-03 01:49:35 +03:00
Ilya Kantor
dd0c19523f
Merge pull request #1839 from leviding/patch-2
Fix minor type error
2020-04-03 01:49:19 +03:00
LeviDing
a223336d3e
Update article.md 2020-04-02 20:34:57 +08:00
Ahmed Magdy Seleem
6b5a524991
fix an anchor link error
Object.assign() is referring to wrong article, which is Sympol.
so I fix it to the right article "objects" with the right section #Cloning and merging, Object.assign
2020-04-02 01:52:15 +02:00
LeviDing
8e22d3f94f
Update article.md 2020-04-01 09:50:11 +08:00
Peter Roche
2a6e87a6e9
Change 'brackets' to 'parentheses'
Again, in American English, and programming, "brackets" usually means "square brackets". "Parentheses" is unambiguous.
2020-03-30 18:25:04 -06:00
Peter Roche
46b3bf6b5a
Change 'brackets' to 'parentheses'
I think this is the way it is typically used here and elsewhere. reserving "brackets" without a qualifier for indicating square brackets., so probably no explanation is necessary. 

But, for those who want to know more:

It does seem to be the case that in British English "brackets" typically means "round brackets", which are parentheses, but in American English "brackets" typically means square brackets ("[]"). 

Admittedly, "brackets" is easier to spell. And to pronounce. Even to type, once you get used to it.
2020-03-30 18:17:55 -06:00
Aakodal
eb546f0e3a
Fixing "sum(1)" instead of "curriedSum(1)" (l. 42)
"sum(1)" doesn't return a wrapper, "curriedSum(1)" does.
2020-03-30 10:34:07 +00:00
Peter Roche
62299ed853
do the same => do the same thing 2020-03-29 16:26:02 -06:00
Ilya Kantor
adfb099a84
Update article.md 2020-03-29 16:40:34 +03:00
Ilya Kantor
42eadf9f56
Merge pull request #1814 from michael-mcgee/closure-article-edit
Edit sentance syntax in closure article
2020-03-29 10:00:09 +03:00
wonderingabout
aad6f5e341 fix missing js formatting 2020-03-29 08:42:52 +02:00
Peter Roche
c038ef4669
Merge pull request #1823 from wonderingabout/trick-deep-copy-spread
Trick get a new copy of object/array using spread operator
2020-03-29 00:19:45 -06:00
wonderingabout
f4cb058d7f trick get a new copy of objects/arrays using the spread operator 2020-03-29 08:05:46 +02:00
Alexey Pyltsyn
ac5fd8cd6b
Merge pull request #1820 from KennethKinLum/patch-12
formatting
2020-03-29 06:00:33 +03:00
Alexey Pyltsyn
09a11abc47
Merge pull request #1744 from qdflavel/typos-fix
Fix a couple small typos
2020-03-29 05:58:34 +03:00
Alexey Pyltsyn
c1c5c730d6
Merge pull request #1748 from GeorgySerga/patch-6
Fix translation
2020-03-29 05:58:02 +03:00
Alexey Pyltsyn
20351cb7c1
Merge pull request #1822 from leviding/patch-9
Fix minor type error
2020-03-29 05:57:34 +03:00
Alexey Pyltsyn
c41b8bd8d2
Update article.md 2020-03-29 05:57:23 +03:00
Alexey Pyltsyn
d6ad00fb79
Merge pull request #1815 from leviding/patch-5
Fix minor type error
2020-03-29 05:56:59 +03:00
Alexey Pyltsyn
0c5d5d2554
Merge pull request #1821 from leviding/patch-8
Fix minor type error, delete unnecessary symbol .
2020-03-29 05:56:27 +03:00
Alexey Pyltsyn
0895276e40
Merge pull request #1824 from leviding/patch-10
Fix minor type errer: delete one space
2020-03-29 05:55:05 +03:00
Alexey Pyltsyn
8cf89b3321
Merge pull request #1825 from wonderingabout/fix-typos
fix typo
2020-03-29 05:54:36 +03:00
Alexey Pyltsyn
6d81d3dc61
Merge pull request #1826 from leviding/patch-11
Fix minor type errer: delete addition space
2020-03-29 05:53:58 +03:00
Alexey Pyltsyn
be80c33c55
Merge pull request #1827 from leviding/patch-12
Fix type error
2020-03-29 05:53:44 +03:00
Alexey Pyltsyn
063bb967bf
Merge pull request #1829 from baooab/patch-6
fix typo
2020-03-29 05:53:26 +03:00
zhangbao
35ff499b92
fix typo 2020-03-29 10:23:34 +08:00
LeviDing
ab7a1869b2
Update article.md 2020-03-28 17:37:56 +08:00
LeviDing
2efef249ca
Update article.md 2020-03-27 18:39:33 +08:00
LeviDing
14cd9ec89e
Update article.md 2020-03-27 18:09:55 +08:00
wonderingabout
0903209ce3 fix typo 2020-03-27 07:56:26 +01:00
LeviDing
da3303b88f
Update article.md 2020-03-27 09:08:04 +08:00
LeviDing
304ae1cd03
Update article.md 2020-03-26 12:35:51 +08:00
LeviDing
03aa504758
Update article.md 2020-03-26 10:05:29 +08:00
Kenneth Lum
ab1b6dee33
formatting 2020-03-25 04:03:36 -07:00
LeviDing
b38e24348c
Update solution.md 2020-03-24 17:03:07 +08:00
Michael McGee
9900be90a7
Edit sentance syntax in closure article 2020-03-24 18:04:26 +10:30
Ilya Kantor
162280b6d2 minor fixes 2020-03-24 05:49:21 +03:00
Ilya Kantor
fd81db7096 closes #1812 2020-03-24 05:47:48 +03:00
Ilya Kantor
6700835b1f closes #1808 2020-03-23 14:29:01 +03:00
LeviDing
460e7a852b
Update article.md 2020-03-23 11:53:28 +08:00
Ilya Kantor
a11cc18d1a
Merge pull request #1807 from leviding/patch-4
Fix some type error
2020-03-22 11:58:49 +03:00
LeviDing
c866c46c84
Update solution.md 2020-03-22 16:47:27 +08:00
Ilya Kantor
6ec3f34e2b closes #1794 2020-03-22 11:06:42 +03:00
Ilya Kantor
d2ac997f1c
Merge pull request #1798 from leviding/patch-4
Update solution of 1-js/02-first-steps/01-hello-world/1-hello-alert
2020-03-21 21:14:48 +03:00
Ilya Kantor
40847464c1
Merge pull request #1799 from leviding/patch-5
Fix error in 1-js/11-async/05-promise-api/article.md
2020-03-21 21:14:32 +03:00
Ilya Kantor
cec58f4278
Merge pull request #1802 from Etheraex/master
Minor statement change
2020-03-21 21:13:46 +03:00
Ilya Kantor
4357ba972b fixes #1794 2020-03-21 20:36:02 +03:00
Alexey Pyltsyn
60d2e2f2a2
Merge pull request #1804 from leviding/patch-6
Fix minor type error
2020-03-21 20:04:42 +03:00
Alexey Pyltsyn
2526d5ccb6
Merge pull request #1797 from xin-nie/xnie-fix-markdown
fix: fix markdown highlight
2020-03-21 20:04:21 +03:00
Ilya Kantor
3086efea77
Merge pull request #1796 from HynekS/fix-lang-and-typo
fix: 2 stray lines of russian and a typo
2020-03-21 10:59:23 +03:00
Ilya Kantor
3c2b027527
Merge pull request #1795 from zhang1pr/master
Fix typos
2020-03-21 10:57:51 +03:00
Ilya Kantor
d19401e4bf
Merge pull request #1792 from aniketkudale/master
Corrected Grammar
2020-03-21 10:57:02 +03:00
Ilya Kantor
b7dc89ad81 closes #1791 2020-03-21 10:56:38 +03:00
Ilya Kantor
81e728c49f
Merge pull request #1789 from zeel/patch-1
fix: removed , from solution.md and task.md  for date data types
2020-03-21 09:15:27 +03:00
Ilya Kantor
4995823c91
Merge pull request #1787 from KuthumiPepple/patch-1
fix typo
2020-03-21 09:15:12 +03:00
Ilya Kantor
8211dfd67c
Merge pull request #1781 from larryng/patch-1
Fix typo.
2020-03-21 09:14:49 +03:00
Ilya Kantor
cf851b0087
Merge pull request #1780 from alexgalkin/master
Comments section: Remove useless spaces
2020-03-21 09:14:41 +03:00
Ilya Kantor
4939a18f24
Merge pull request #1779 from leviding/patch-3
func.apply(context, args);   // is same as using apply => Is a type error?
2020-03-21 09:14:27 +03:00
Ilya Kantor
0d0908f4d7
Merge pull request #1776 from YRFT/patch-1
Fix typo
2020-03-21 09:14:12 +03:00
Ilya Kantor
d9d2127a3f
Merge pull request #1774 from duongdominhchau/patch-1
Add commas after non-terminal properties
2020-03-21 09:13:36 +03:00
Ilya Kantor
58d4329bb5
Merge pull request #1771 from detinsley1s/patch-1
Fix typo
2020-03-21 09:13:19 +03:00
Ilya Kantor
63518dce9f
Merge pull request #1770 from jorishr/patch-1
small typo fix
2020-03-21 09:13:08 +03:00
Ilya Kantor
fe5d6d9570
Merge pull request #1765 from u-n-known/patch-3
Copy and paste mistake
2020-03-21 09:12:53 +03:00
Ilya Kantor
94b9c9d776 minor fixes 2020-03-21 09:11:53 +03:00
LeviDing
bfe8e3f3f7
Update article.md 2020-03-19 18:48:57 +08:00
Etheraex
b93cf9d4fe Minor statement change 2020-03-14 20:59:49 +01:00
Ilya Kantor
c116813f9b
Merge pull request #1800 from Violet-Bora-Lee/master
minor fixes
2020-03-14 10:48:04 +03:00
Violet Bora Lee
958cbe72b8 minor fixes
- fix erratas
- fix wrong error message
- add 'run' on runnable example
- add explanation about window.onload property corresponding load event
- add comment about window.onstorage property corresponding storage event
2020-03-14 07:27:49 +09:00
LeviDing
07bd7249fe
Update article.md 2020-03-13 16:02:22 +08:00
LeviDing
44e88b872c
Update solution.md 2020-03-12 11:32:52 +08:00
LeviDing
4df68f5632
Update index.html 2020-03-12 11:31:48 +08:00
LeviDing
be02f57776
Update index.html 2020-03-12 11:31:30 +08:00
LeviDing
8a13b9b5d6
Create index.html 2020-03-12 11:26:42 +08:00
Xin Nie
61bd2b33ed fix: fix markdown highlight 2020-03-11 22:22:26 +01:00
HynekS
691730570a fix: 2 lines of russian to english and a typo (mathces -> matches) 2020-03-11 21:57:18 +01:00
Chao Zhang
6ee0d97997
Fix a typo 2020-03-10 20:31:45 -04:00
Chao Zhang
3b48deeffa
Fix a typo 2020-03-10 20:17:35 -04:00
Alexey Pyltsyn
36737518f8
Fix typo 2020-03-10 12:54:07 +03:00
Aniket Kudale
76bf5ec8a9
Corrected Grammar 2020-03-09 23:22:36 +05:30
Aniket Kudale
79356bbd4a
Merge pull request #7 from javascript-tutorial/master
Repo Update
2020-03-08 00:40:30 +05:30
Zeel
8ae11cb2ed
fix: removed , from task.md date data types 2020-03-07 12:21:57 +05:30
Zeel
131c96e669
fix: removed , from solution.md date data types 2020-03-07 12:21:19 +05:30
Kuthumi Pepple
696eda5d02
fix typo
Number should be 79031234567 not 79035419441
2020-03-03 23:20:19 +01:00
Ilya Kantor
fcfef6a078
Merge pull request #1782 from zeel/patch-1
corrected order for subtraction
2020-03-01 12:58:49 +00:00
Ilya Kantor
4a15b96613
Merge pull request #1783 from Violet-Bora-Lee/patch-1
minor fixes
2020-03-01 12:58:26 +00:00
Bora Lee (Violet)
cf6821e0a4
minor fixes 2020-03-01 21:27:35 +09:00
Zeel
4325537b0f
corrected order for subtraction 2020-03-01 17:04:57 +05:30
Ilya Kantor
c72cca89d5 minor fixes 2020-03-01 08:44:34 +00:00
Aniket Kudale
4e04bcbe33
Merge pull request #6 from javascript-tutorial/master
Update Repo
2020-03-01 12:15:19 +05:30
Larry Ng
fafee0e468
Fix typo. 2020-02-29 23:30:04 -05:00
Alex Galkin
637088d5be
Remove useless spaces
they have no effect on the article's appearance
2020-02-29 22:58:16 +02:00
LeviDing
c039f04ef9
Update article.md 2020-02-29 19:52:30 +08:00
Peter Roche
88120708b1
"allows to" -> "allows us to" (2x) 2020-02-28 23:48:18 -07:00
Peter Roche
177f4b3b5e
Update article.md
"we should use `for...loop`" -> "we should use a `for...loop`"
2020-02-28 22:32:22 -07:00
Peter Roche
7550fd59fa
Merge pull request #1777 from javascript-tutorial/paroche-patch-19
Update article.md
2020-02-28 21:54:03 -07:00
Peter Roche
131016b7ca
Update article.md
"allows to" -> "allows us to" (3x)
2020-02-28 21:49:39 -07:00
Peter Roche
6c8433eedf
Update article.md
Rephrasing introductory sentences about async iterators and generators.
2020-02-28 21:27:44 -07:00
Dương Đỗ Minh Châu
2abe375239
Add commas non-terminal properties 2020-02-29 11:13:08 +07:00
YRFT
0307fcb9a4 Fix typo 2020-02-29 12:09:02 +08:00
Daniel Tinsley
81ea42015b
Fix typo
Changed "it's" to "its" since that is the correct spelling of the possessive form of "it."
2020-02-26 17:19:11 -06:00
jorishr
1c1b8a0b94
small typo fix
element.addEventListener(event, handler[, options]); TO element.addEventListener(event, handler, [options]);
2020-02-24 19:17:02 +01:00
Alexey Pyltsyn
405150f1f2
Merge pull request #1766 from bibin765/master
Update article.md
2020-02-24 01:39:43 +03:00
Alexey Pyltsyn
d0ad658156
Merge pull request #1767 from u-n-known/patch-4
Some missing whitespaces
2020-02-24 01:36:04 +03:00
Ilya Kantor
87d03ce17b
Merge pull request #1768 from leviding/patch-3
Fix minor typo error of 1-js/06-advanced-functions/03-closure/article.md
2020-02-23 17:19:41 +00:00
LeviDing
33c2a4e39d
Update article.md 2020-02-23 17:49:11 +08:00
u-n-known
169389f7d5
Some missing whitespaces 2020-02-23 00:36:26 +01:00
Bibin Mathew
2f066b4849
Update article.md 2020-02-22 09:41:35 +05:30
Peter Roche
188f497f86
"better to demonstrate" -> "best demonstrated", ", like this:" -> ":" 2020-02-21 15:56:24 -07:00
u-n-known
dd4d218c6b
Copy and paste mistake
The code never has been not OK. It's just a copy from an example of the chapter before.
2020-02-20 23:54:01 +01:00
Aniket Kudale
4f6356bcca
Merge pull request #5 from javascript-tutorial/master
Updated Repo
2020-02-20 15:16:35 +05:30
Ilya Kantor
3e93486425 closes #1758 2020-02-20 09:42:25 +00:00
Ilya Kantor
016213e445
Merge pull request #1760 from nishantsinghcs/patch-1
Mac OS multiline Commenting shortcut is should use 'Option' instead o…
2020-02-19 00:15:04 +00:00
Nishant
d12903c56c
Mac OS multiline Commenting shortcut is should use 'Option' instead of 'Shift' #1743
Fix Submitted.
2020-02-19 00:11:31 +00:00
Ilya Kantor
cedd3ed9ad closes #1742 2020-02-19 00:02:23 +00:00
Ilya Kantor
233b0bd02b
Merge pull request #1752 from nekhaevskiy/patch-1
Remove unnecessary return in couple of examples
2020-02-18 23:52:03 +00:00
Ilya Kantor
323f1552ac
Merge pull request #1754 from rizkyzhang/patch-2
Update article.md
2020-02-18 23:51:32 +00:00
Ilya Kantor
1c5b07c3c8
Merge pull request #1755 from rizkyzhang/patch-3
Fix typo
2020-02-18 23:51:04 +00:00
Ilya Kantor
6fa9659ea6
Merge pull request #1756 from achianumba/patch-1
fix: Minor typo and grammar
2020-02-18 23:50:49 +00:00
Ilya Kantor
2437d3de2a
Merge pull request #1759 from cycduck/wage-gap-fix
Gender pay gap noticed in recursion article.md
2020-02-18 23:50:27 +00:00
Ilya Kantor
81def0275e minor fixes 2020-02-18 23:46:24 +00:00
Kelly K H
642b56329e edited alice's wage difference, wage is based on the average of her male counterparts and rounded up for easy comprehension. 2020-02-18 13:14:35 -05:00
Arinze Chianumba
5413a9cb08
fix: Minor typo and grammar 2020-02-16 10:54:28 +01:00
Rizky
44a6c12654
Fix typo 2020-02-16 11:14:09 +07:00
Rizky
2cd077cca8
Update article.md 2020-02-16 11:04:58 +07:00
Ilya Kantor
9acc1302a1 fixes #1747 2020-02-14 13:46:16 +00:00
Yury Nekhaevskiy
1304aa12fc
Remove unnecessary return in couple of examples 2020-02-14 10:34:33 +03:00
Peter Roche
c6c25c97da
Update article.md
"if arguments count" -> "if the arguments count"
"allows to easily" -> "allows us to easily"
"seen in the logging example:" -> "seen in the logging example,"
rephrasing rest of above sentence for readability
2020-02-13 22:19:17 -07:00
Peter Roche
7fb11bd13a
Update article.md
"get in details" -> "get in to the details"
2020-02-13 21:49:19 -07:00
Peter Roche
220bed3fd6
Update article.md
"From one hand" -> "On one hand"
2020-02-13 20:44:48 -07:00
Peter Roche
1dd5e0681c
Update article.md
"to react on other user actions" -> "to react to other user actions"  (a little more natural sounding)
2020-02-13 20:41:51 -07:00
Peter Roche
0b2cbf947b
Update article.md
'The browser may even show "the script..." warning' -> 'The browser may even show a "the script..." warning'
2020-02-13 20:37:09 -07:00
Peter Roche
6cf0f086e7
Update article.md
"using nested `setTimeout`:" -> "using nested `setTimeout` calls:"
2020-02-13 20:34:23 -07:00
Peter Roche
863b3207c1
Update article.md
"big text" -> "large amount of text"
"evade problems" -> "avoid problems"
"another 100 lines" -> "for the next 100 lines"
"To demonstrate the approach" -> "To demonstrate this approach"
"instead of syntax-highlighting" -> "instead of text-highlighting,"
2020-02-13 20:31:29 -07:00
u-n-known
f8e2ed0eca
Either quotation marks or italicization
Highlighting twice is unnecessary.
2020-02-14 00:41:09 +01:00
galunni
ec6b5c1200
Update article.md
precedence 17 instead of 16 now, since table has been updated
2020-02-13 19:30:09 +01:00
Georgy
2bc6d87804
Fix translation 2020-02-13 00:07:20 -05:00
Ilya Kantor
cb8c12c5c6
Merge pull request #1746 from u-n-known/patch-2
Incorrect precedence numbers (prob. "language-wide")
2020-02-12 12:38:14 +00:00
Peter Roche
62c32d2351
Update article.md
"roll our own" -> "roll your own"
"can see that's" - "can see that that's"
2020-02-12 01:04:14 -07:00
Peter Roche
42920c176f
Update article.md
"similar stuff to described above" -> "similar stuff to what's described above"
2020-02-12 01:02:24 -07:00
Ilya Kantor
db9b5805c4 closes #1747 2020-02-12 07:40:35 +00:00
Peter Roche
ff82a9bc89
Update article.md
"move the scheduling to the beginning" (2x)
2020-02-11 22:38:44 -07:00
Peter Roche
3b681c8ceb
Update article.md
"returns to event loop" -> "returns to the event loop"
"no much difference" -> "not much difference"
2020-02-11 22:32:10 -07:00
Peter Roche
837f7ab024
Update article.md
"chapter" -> "article" 2x
2020-02-11 22:19:54 -07:00
u-n-known
00a1f2c470
False precedence numbers
According to the MDN precedence-table you've linked some precedence numbers are incorrect. Having a quick look at different language versions (French and Russian) this error may has to be corrected at every version.
2020-02-11 18:15:36 +01:00
Alexey Pyltsyn
425a0af8be
Merge pull request #1745 from u-n-known/patch-1
Grammar mistake (?)
2020-02-11 14:35:22 +03:00
Peter Roche
0b2e5e745b
Update article.md
"on the paper" -> "on paper"
2020-02-10 23:24:00 -07:00
Peter Roche
59861ad2e3
Update article.md
"return `undefined`" -> "returns `undefined`"
2020-02-10 23:02:31 -07:00
Peter Roche
bad9ca5465
Update article.md
add semicolon at end -> "    return prop >= target.start && prop <= target.end;"
2020-02-10 21:45:12 -07:00
u-n-known
bad780799f
Grammar mistake (?)
It literally says «Operating System system functions.»
2020-02-10 23:25:43 +01:00
Quinn Flavel
16590d9770
Typo fix 2020-02-10 11:09:15 -05:00
qdflavel
1c2dd6a282
Remove extra word 2020-02-10 11:06:00 -05:00
Alexey Pyltsyn
cad5a28a21
Fix link in BigInt 2020-02-10 18:29:17 +03:00
Peter Roche
10c7807f49
Update article.md
"as `Proxy` trap" -> "as the `Proxy` trap"
2020-02-08 21:02:22 -07:00
Peter Roche
fd0d378f0a
Update article.md
"chapter" -> "article" (6 times or so)

I believe that is consistent with the agreed-upon terminology.
2020-02-08 20:44:59 -07:00
Peter Roche
2fee345f6e
Update article.md
"That's not a function" -> "It's not a function"
2020-02-08 16:39:17 -07:00
Peter Roche
08720f059a
Update article.md
"better convenience" -> "more convenience"
2020-02-08 16:05:53 -07:00
Ilya Kantor
60d9fe607c Revert "Revert "minor fixes""
This reverts commit d6035ee890.
2020-02-08 21:05:37 +00:00
Ilya Kantor
d6035ee890 Revert "minor fixes"
This reverts commit e4fb777e31.
2020-02-08 21:00:32 +00:00
Ilya Kantor
e4fb777e31 minor fixes 2020-02-08 20:50:58 +00:00
Ilya Kantor
bf8fe9fbe6 Merge branch 'master' of https://github.com/iliakan/javascript-tutorial-en 2020-02-08 09:20:33 +00:00
Ilya Kantor
4a10b922c7 fix en #1739 2020-02-08 09:19:24 +00:00
Peter Roche
3fc0a5d591
Update article.md
"`async` attribute" -> "the `async` attribute"
2020-02-08 00:54:14 -07:00
Peter Roche
3fe2976963
Update article.md
"be aware that HTML-page" -> "be aware that the HTML page"
2020-02-07 01:08:07 -07:00
Peter Roche
c3213d38f7
Update article.md
"allows to configure" -> "allows us to configure"
2020-02-07 00:37:33 -07:00
Peter Roche
bd0fbf925b
Update article.md
"Let's see that on examples." -> "Let's look at them using examples:"
2020-02-07 00:33:12 -07:00
Peter Roche
f47b732265
Update article.md
"That's the correct variant:" -> "This is the correct variant:"
2020-02-07 00:27:38 -07:00
Peter Roche
a06341ba80
Update article.md
"`import` allows to import functionality.." -> "`import` allows the import of functionality..."

"relative the current file" -> "relative to the current file,"
2020-02-07 00:22:01 -07:00
Peter Roche
ce70814086
Update article.md
My proposed change may not be right, but "make a request to URL" was unclear, and it's `fetch` that's used below to make the request. If 'request to URL' has some special meaning and is what you want to say, maybe some rephrasing is in order.
2020-02-06 23:36:04 -07:00
Peter Roche
9a4bc89d6d
Update article.md
"such as browsers" -> "like in browsers"
2020-02-06 23:27:22 -07:00
Peter Roche
537c33493a
Update article.md
Several punctuation changes, yielding:

"1. We use the browser [fetch](info:fetch) method to download from a remote URL. It allows us to supply authorization and other headers if needed -- here GitHub requires `User-Agent`.
2. The fetch result is parsed as JSON. That's again a `fetch`-specific method.
3. We should get the next page URL from the `Link` header of the response. It has a special format, so we use a regexp for that. The next page URL may look like `https://api.github.com/repositories/93253246/commits?page=2`. It's generated by GitHub itself.
4. Then we yield all commits received, and when they finish, the next `while(url)` iteration will trigger, making one more request."
2020-02-06 23:21:57 -07:00
Peter Roche
671c4d41ee
Update article.md
"returns the result outside" -> "returns the result to the outside"
2020-02-06 22:15:48 -07:00
Peter Roche
4d0ceef055
Update article.md
"yield is a two-way road" -> "yield is a two-way street"

"Two way street" is by far the more common and accepted way to say this. If you look up "two-way road" you will typically be redirected to "two-way street".
2020-02-06 21:47:38 -07:00
Peter Roche
6994fc096a
Update article.md
", we have an object that is not an array, " -> ", we have an object that is not an array, "
2020-02-05 23:46:52 -07:00
Peter Roche
0a2172a077
Merge pull request #1725 from Beginnerds/patch-1
Update article.md
2020-02-05 14:26:34 -07:00
Ilya Kantor
81e9f1779b minor fixes 2020-02-05 10:51:47 +00:00
Ilya Kantor
3899cc06ce minor fixes 2020-02-05 10:48:52 +00:00
Ilya Kantor
5d4086ee69
Merge pull request #1729 from KennethKinLum/patch-8
adding the `[^]` pattern
2020-02-05 10:47:44 +00:00
Ilya Kantor
0081fbdfb4
Merge pull request #1737 from javascript-tutorial/paroche-patch-15
Update article.md
2020-02-05 10:47:11 +00:00
Ilya Kantor
f9feec2d69 minor fixes 2020-02-04 16:43:35 +00:00
Peter Roche
9927cd09de
Update article.md
Maybe clarifying a bit where `.json()` comes from. I personally found it a bit confusing at first.
2020-02-03 20:23:05 -07:00
Kin Lum
c498fc62b9
adding the [^] pattern 2020-01-29 13:43:35 -08:00
Beginnerds
4973824930
Update article.md
Corrected grammatical errors.
2020-01-28 16:35:09 +05:30
Aniket Kudale
5a71d10f45
Merge pull request #4 from javascript-tutorial/master
Updating Repo 27-01-2020
2020-01-27 00:32:57 +05:30
Aniket Kudale
f423a00e24
Merge pull request #3 from iliakan/master
Update repo 04-Sept-2018
2018-09-04 11:43:12 +05:30
Aniket Kudale
85be7a550e
Merge pull request #2 from iliakan/master
Repo Update 4-Aug, 2018
2018-08-04 23:18:19 +05:30
635 changed files with 6649 additions and 3973 deletions

1
.gitignore vendored
View file

@ -21,3 +21,4 @@ sftp-config.json
Thumbs.db Thumbs.db
/svgs

View file

@ -1,10 +1,10 @@
# An Introduction to JavaScript # An Introduction to JavaScript
Let's see what's so special about JavaScript, what we can achieve with it, and which other technologies play well with it. Let's see what's so special about JavaScript, what we can achieve with it, and what other technologies play well with it.
## What is JavaScript? ## What is JavaScript?
*JavaScript* was initially created to *"make web pages alive"*. *JavaScript* was initially created to "make web pages alive".
The programs in this language are called *scripts*. They can be written right in a web page's HTML and run automatically as the page loads. The programs in this language are called *scripts*. They can be written right in a web page's HTML and run automatically as the page loads.
@ -24,18 +24,18 @@ The browser has an embedded engine sometimes called a "JavaScript virtual machin
Different engines have different "codenames". For example: Different engines have different "codenames". For example:
- [V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)) -- in Chrome and Opera. - [V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)) -- in Chrome, Opera and Edge.
- [SpiderMonkey](https://en.wikipedia.org/wiki/SpiderMonkey) -- in Firefox. - [SpiderMonkey](https://en.wikipedia.org/wiki/SpiderMonkey) -- in Firefox.
- ...There are other codenames like "Trident" and "Chakra" for different versions of IE, "ChakraCore" for Microsoft Edge, "Nitro" and "SquirrelFish" for Safari, etc. - ...There are other codenames like "Chakra" for IE, "JavaScriptCore", "Nitro" and "SquirrelFish" for Safari, etc.
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. 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.
```smart header="How do engines work?" ```smart header="How do engines work?"
Engines are complicated. But the basics are easy. Engines are complicated. But the basics are easy.
1. The engine (embedded if it's a browser) reads ("parses") the script. 1. The engine (embedded if it's a browser) reads ("parses") the script.
2. Then it converts ("compiles") the script to the machine language. 2. Then it converts ("compiles") the script to machine code.
3. And then the machine code runs, pretty fast. 3. And then the machine code runs, pretty fast.
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. 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.
@ -43,7 +43,7 @@ The engine applies optimizations at each step of the process. It even watches th
## What can in-browser JavaScript do? ## What can in-browser JavaScript do?
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. 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.
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. 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.
@ -59,25 +59,25 @@ For instance, in-browser JavaScript is able to:
## What CAN'T in-browser JavaScript do? ## What CAN'T in-browser JavaScript do?
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. 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.
Examples of such restrictions include: Examples of such restrictions include:
- 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 system functions. - 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.
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. 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.
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). 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).
- 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). - 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).
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. 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.
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. 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.
- 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. - 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.
![](limitations.svg) ![](limitations.svg)
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. 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.
## What makes JavaScript unique? ## What makes JavaScript unique?
@ -86,13 +86,13 @@ There are at least *three* great things about JavaScript:
```compare ```compare
+ Full integration with HTML/CSS. + Full integration with HTML/CSS.
+ Simple things are done simply. + Simple things are done simply.
+ Support by all major browsers and enabled by default. + Supported by all major browsers and enabled by default.
``` ```
JavaScript is the only browser technology that combines these three things. JavaScript is the only browser technology that combines these three things.
That's what makes JavaScript unique. That's why it's the most widespread tool for creating browser interfaces. That's what makes JavaScript unique. That's why it's the most widespread tool for creating browser interfaces.
That said, JavaScript also allows to create servers, mobile applications, etc. That said, JavaScript can be used to create servers, mobile applications, etc.
## Languages "over" JavaScript ## Languages "over" JavaScript
@ -100,21 +100,23 @@ The syntax of JavaScript does not suit everyone's needs. Different people want d
That's to be expected, because projects and requirements are different for everyone. That's to be expected, because projects and requirements are different for everyone.
So recently a plethora of new languages appeared, which are *transpiled* (converted) to JavaScript before they run in the browser. So, recently a plethora of new languages appeared, which are *transpiled* (converted) to JavaScript before they run in the browser.
Modern tools make the transpilation very fast and transparent, actually allowing developers to code in another language and auto-converting it "under the hood". Modern tools make the transpilation very fast and transparent, actually allowing developers to code in another language and auto-converting it "under the hood".
Examples of such languages: Examples of such languages:
- [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. - [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.
- [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. - [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.
- [Flow](http://flow.org/) also adds data typing, but in a different way. Developed by Facebook. - [Flow](https://flow.org/) also adds data typing, but in a different way. Developed by Facebook.
- [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. - [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.
- [Brython](https://brython.info/) is a Python transpiler to JavaScript that enables the writing of applications in pure Python without JavaScript.
- [Kotlin](https://kotlinlang.org/docs/reference/js-overview.html) is a modern, concise and safe programming language that can target the browser or Node.
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. 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.
## Summary ## Summary
- JavaScript was initially created as a browser-only language, but is now used in many other environments as well. - JavaScript was initially created as a browser-only language, but it is now used in many other environments as well.
- Today, JavaScript has a unique position as the most widely-adopted browser language with full integration with HTML/CSS. - Today, JavaScript has a unique position as the most widely-adopted browser language, fully integrated with HTML/CSS.
- 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. - 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.

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

View file

@ -1,7 +1,7 @@
# Manuals and specifications # Manuals and specifications
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 sources. 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.
## Specification ## Specification
@ -9,24 +9,19 @@ This book is a *tutorial*. It aims to help you gradually learn the language. But
But being that formalized, it's difficult to understand at first. So if you need the most trustworthy source of information about the language details, the specification is the right place. But it's not for everyday use. But being that formalized, it's difficult to understand at first. So if you need the most trustworthy source of information about the language details, the specification is the right place. But it's not for everyday use.
A new specification version is released every year. In-between these releases, the latest specification draft is at <https://tc39.es/ecma262/>. A new specification version is released every year. Between these releases, the latest specification draft is at <https://tc39.es/ecma262/>.
To read about new bleeding-edge features, including those that are "almost standard" (so-called "stage 3"), see proposals at <https://github.com/tc39/proposals>. To read about new bleeding-edge features, including those that are "almost standard" (so-called "stage 3"), see proposals at <https://github.com/tc39/proposals>.
Also, if you're in developing for the browser, then there are other specs covered in the [second part](info:browser-environment) of the tutorial. Also, if you're developing for the browser, then there are other specifications covered in the [second part](info:browser-environment) of the tutorial.
## Manuals ## Manuals
- **MDN (Mozilla) JavaScript Reference** is a manual with examples and other information. It's great to get in-depth information about individual language functions, methods etc. - **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.
One can find it at <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference>. You can find it at <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference>.
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. 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.
- **MSDN** Microsoft manual with a lot of information, including JavaScript (often referred to as JScript). If one needs something specific to Internet Explorer, better go there: <http://msdn.microsoft.com/>.
Also, we can use an internet search with phrases such as "RegExp MSDN" or "RegExp MSDN jscript".
## Compatibility tables ## Compatibility tables
@ -34,9 +29,9 @@ JavaScript is a developing language, new features get added regularly.
To see their support among browser-based and other engines, see: To see their support among browser-based and other engines, see:
- <http://caniuse.com> - per-feature tables of support, e.g. to see which engines support modern cryptography functions: <http://caniuse.com/#feat=cryptography>. - <https://caniuse.com> - per-feature tables of support, e.g. to see which engines support modern cryptography functions: <https://caniuse.com/#feat=cryptography>.
- <https://kangax.github.io/compat-table> - a table with language features and engines that support those or don't support. - <https://kangax.github.io/compat-table> - a table with language features and engines that support those or don't support.
All these resources are useful in real-life development, as they contain valuable information about language details, their support etc. All these resources are useful in real-life development, as they contain valuable information about language details, their support, etc.
Please remember them (or this page) for the cases when you need in-depth information about a particular feature. Please remember them (or this page) for the cases when you need in-depth information about a particular feature.

View file

@ -13,7 +13,7 @@ An IDE loads the project (which can be many files), allows navigation between fi
If you haven't selected an IDE yet, consider the following options: If you haven't selected an IDE yet, consider the following options:
- [Visual Studio Code](https://code.visualstudio.com/) (cross-platform, free). - [Visual Studio Code](https://code.visualstudio.com/) (cross-platform, free).
- [WebStorm](http://www.jetbrains.com/webstorm/) (cross-platform, paid). - [WebStorm](https://www.jetbrains.com/webstorm/) (cross-platform, paid).
For Windows, there's also "Visual Studio", not to be confused with "Visual Studio Code". "Visual Studio" is a paid and mighty Windows-only editor, well-suited for the .NET platform. It's also good at JavaScript. There's also a free version [Visual Studio Community](https://www.visualstudio.com/vs/community/). For Windows, there's also "Visual Studio", not to be confused with "Visual Studio Code". "Visual Studio" is a paid and mighty Windows-only editor, well-suited for the .NET platform. It's also good at JavaScript. There's also a free version [Visual Studio Community](https://www.visualstudio.com/vs/community/).
@ -31,8 +31,6 @@ In practice, lightweight editors may have a lot of plugins including directory-l
The following options deserve your attention: The following options deserve your attention:
- [Atom](https://atom.io/) (cross-platform, free).
- [Visual Studio Code](https://code.visualstudio.com/) (cross-platform, free).
- [Sublime Text](http://www.sublimetext.com) (cross-platform, shareware). - [Sublime Text](http://www.sublimetext.com) (cross-platform, shareware).
- [Notepad++](https://notepad-plus-plus.org/) (Windows, free). - [Notepad++](https://notepad-plus-plus.org/) (Windows, free).
- [Vim](http://www.vim.org/) and [Emacs](https://www.gnu.org/software/emacs/) are also cool if you know how to use them. - [Vim](http://www.vim.org/) and [Emacs](https://www.gnu.org/software/emacs/) are also cool if you know how to use them.

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<body>
<script>
alert( "I'm JavaScript!" );
</script>
</body>
</html>

View file

@ -0,0 +1,2 @@
[html src="index.html"]

View file

@ -9,7 +9,7 @@ So first, let's see how we attach a script to a webpage. For server-side environ
## The "script" tag ## The "script" tag
JavaScript programs can be inserted into any part of an HTML document with the help of the `<script>` tag. JavaScript programs can be inserted almost anywhere into an HTML document using the `<script>` tag.
For instance: For instance:
@ -46,7 +46,7 @@ The `<script>` tag contains JavaScript code which is automatically executed when
The `<script>` tag has a few attributes that are rarely used nowadays but can still be found in old code: The `<script>` tag has a few attributes that are rarely used nowadays but can still be found in old code:
The `type` attribute: <code>&lt;script <u>type</u>=...&gt;</code> The `type` attribute: <code>&lt;script <u>type</u>=...&gt;</code>
: The old HTML standard, HTML4, required a script to have a `type`. Usually it was `type="text/javascript"`. It's not required anymore. Also, the modern HTML standard totally changed the meaning of this attribute. Now, it can be used for JavaScript modules. But that's an advanced topic; we'll talk about modules in another part of the tutorial. : The old HTML standard, HTML4, required a script to have a `type`. Usually it was `type="text/javascript"`. It's not required anymore. Also, the modern HTML standard totally changed the meaning of this attribute. Now, it can be used for JavaScript modules. But that's an advanced topic, we'll talk about modules in another part of the tutorial.
The `language` attribute: <code>&lt;script <u>language</u>=...&gt;</code> The `language` attribute: <code>&lt;script <u>language</u>=...&gt;</code>
: This attribute was meant to show the language of the script. This attribute no longer makes sense because JavaScript is the default language. There is no need to use it. : This attribute was meant to show the language of the script. This attribute no longer makes sense because JavaScript is the default language. There is no need to use it.
@ -73,12 +73,12 @@ Script files are attached to HTML with the `src` attribute:
<script src="/path/to/script.js"></script> <script src="/path/to/script.js"></script>
``` ```
Here, `/path/to/script.js` is an absolute path to the script from the site root. One can also provide a relative path from the current page. For instance, `src="script.js"` would mean a file `"script.js"` in the current folder. Here, `/path/to/script.js` is an absolute path to the script from the site root. One can also provide a relative path from the current page. For instance, `src="script.js"`, just like `src="./script.js"`, would mean a file `"script.js"` in the current folder.
We can give a full URL as well. For instance: We can give a full URL as well. For instance:
```html ```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.2.0/lodash.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js"></script>
``` ```
To attach several scripts, use multiple tags: To attach several scripts, use multiple tags:

View file

@ -46,7 +46,7 @@ alert(3 +
+ 2); + 2);
``` ```
The code outputs `6` because JavaScript does not insert semicolons here. It is intuitively obvious that if the line ends with a plus `"+"`, then it is an "incomplete expression", so the semicolon is not required. And in this case that works as intended. The code outputs `6` because JavaScript does not insert semicolons here. It is intuitively obvious that if the line ends with a plus `"+"`, then it is an "incomplete expression", so a semicolon there would be incorrect. And in this case, that works as intended.
**But there are situations where JavaScript "fails" to assume a semicolon where it is really needed.** **But there are situations where JavaScript "fails" to assume a semicolon where it is really needed.**
@ -56,45 +56,41 @@ Errors which occur in such cases are quite hard to find and fix.
If you're curious to see a concrete example of such an error, check this code out: If you're curious to see a concrete example of such an error, check this code out:
```js run ```js run
[1, 2].forEach(alert) alert("Hello");
[1, 2].forEach(alert);
``` ```
No need to think about the meaning of the brackets `[]` and `forEach` yet. We'll study them later. For now, just remember the result of the code: it shows `1` then `2`. No need to think about the meaning of the brackets `[]` and `forEach` yet. We'll study them later. For now, just remember the result of running the code: it shows `Hello`, then `1`, then `2`.
Now, let's add an `alert` before the code and *not* finish it with a semicolon: Now let's remove the semicolon after the `alert`:
```js run no-beautify ```js run no-beautify
alert("There will be an error") alert("Hello")
[1, 2].forEach(alert) [1, 2].forEach(alert);
``` ```
Now if we run the code, only the first `alert` is shown and then we have an error! The difference compared to the code above is only one character: the semicolon at the end of the first line is gone.
But everything is fine again if we add a semicolon after `alert`: If we run this code, only the first `Hello` shows (and there's an error, you may need to open the console to see it). There are no numbers any more.
```js run
alert("All fine now");
[1, 2].forEach(alert) That's because JavaScript does not assume a semicolon before square brackets `[...]`. So, the code in the last example is treated as a single statement.
```
Now we have the "All fine now" message followed by `1` and `2`. Here's how the engine sees it:
The error in the no-semicolon variant occurs because JavaScript does not assume a semicolon before square brackets `[...]`.
So, because the semicolon is not auto-inserted, the code in the first example is treated as a single statement. Here's how the engine sees it:
```js run no-beautify ```js run no-beautify
alert("There will be an error")[1, 2].forEach(alert) alert("Hello")[1, 2].forEach(alert);
``` ```
But it should be two separate statements, not one. Such a merging in this case is just wrong, hence the error. This can happen in other situations. Looks weird, right? Such merging in this case is just wrong. We need to put a semicolon after `alert` for the code to work correctly.
This can happen in other situations also.
```` ````
We recommend putting semicolons between statements even if they are separated by newlines. This rule is widely adopted by the community. Let's note once again -- *it is possible* to leave out semicolons most of the time. But it's safer -- especially for a beginner -- to use them. We recommend putting semicolons between statements even if they are separated by newlines. This rule is widely adopted by the community. Let's note once again -- *it is possible* to leave out semicolons most of the time. But it's safer -- especially for a beginner -- to use them.
## Comments ## Comments [#code-comments]
As time goes on, programs become more and more complex. It becomes necessary to add *comments* which describe what the code does and why. As time goes on, programs become more and more complex. It becomes necessary to add *comments* which describe what the code does and why.
@ -136,7 +132,7 @@ alert('World');
``` ```
```smart header="Use hotkeys!" ```smart header="Use hotkeys!"
In most editors, a line of code can be commented out by pressing the `key:Ctrl+/` hotkey for a single-line comment and something like `key:Ctrl+Shift+/` -- for multiline comments (select a piece of code and press the hotkey). For Mac, try `key:Cmd` instead of `key:Ctrl`. In most editors, a line of code can be commented out by pressing the `key:Ctrl+/` hotkey for a single-line comment and something like `key:Ctrl+Shift+/` -- for multiline comments (select a piece of code and press the hotkey). For Mac, try `key:Cmd` instead of `key:Ctrl` and `key:Option` instead of `key:Shift`.
``` ```
````warn header="Nested comments are not supported!" ````warn header="Nested comments are not supported!"

View file

@ -19,8 +19,7 @@ For example:
... ...
``` ```
We will learn functions (a way to group commands) soon. Looking ahead, let's note that `"use strict"` can be put at the beginning of the function body instead of the whole script. Doing that enables strict mode in that function only. But usually, people use it for the whole script. Quite soon we're going to learn functions (a way to group commands), so let's note in advance that `"use strict"` can be put at the beginning of a function. Doing that enables strict mode in that function only. But usually people use it for the whole script.
````warn header="Ensure that \"use strict\" is at the top" ````warn header="Ensure that \"use strict\" is at the top"
Please make sure that `"use strict"` is at the top of your scripts, otherwise strict mode may not be enabled. Please make sure that `"use strict"` is at the top of your scripts, otherwise strict mode may not be enabled.
@ -47,11 +46,13 @@ Once we enter strict mode, there's no going back.
## Browser console ## Browser console
For the future, when you use a browser console to test features, please note that it doesn't `use strict` by default. When you use a [developer console](info:devtools) to run code, please note that it doesn't `use strict` by default.
Sometimes, when `use strict` makes a difference, you'll get incorrect results. Sometimes, when `use strict` makes a difference, you'll get incorrect results.
You can try to press `key:Shift+Enter` to input multiple lines, and put `use strict` on top, like this: So, how to actually `use strict` in the console?
First, you can try to press `key:Shift+Enter` to input multiple lines, and put `use strict` on top, like this:
```js ```js
'use strict'; <Shift+Enter for a newline> 'use strict'; <Shift+Enter for a newline>
@ -61,25 +62,28 @@ You can try to press `key:Shift+Enter` to input multiple lines, and put `use str
It works in most browsers, namely Firefox and Chrome. It works in most browsers, namely Firefox and Chrome.
If it doesn't, the most reliable way to ensure `use strict` would be to input the code into console like this: If it doesn't, e.g. in an old browser, there's an ugly, but reliable way to ensure `use strict`. Put it inside this kind of wrapper:
```js ```js
(function() { (function() {
'use strict'; 'use strict';
// ...your code... // ...your code here...
})() })()
``` ```
## Always "use strict" ## Should we "use strict"?
We have yet to cover the differences between strict mode and the "default" mode. The question may sound obvious, but it's not so.
In the next chapters, as we learn language features, we'll note the differences between the strict and default modes. Luckily, there aren't many and they actually make our lives better. One could recommend to start scripts with `"use strict"`... But you know what's cool?
For now, it's enough to know about it in general: Modern JavaScript supports "classes" and "modules" - advanced language structures (we'll surely get to them), that enable `use strict` automatically. So we don't need to add the `"use strict"` directive, if we use them.
1. The `"use strict"` directive switches the engine to the "modern" mode, changing the behavior of some built-in features. We'll see the details later in the tutorial. **So, for now `"use strict";` is a welcome guest at the top of your scripts. Later, when your code is all in classes and modules, you may omit it.**
2. Strict mode is enabled by placing `"use strict"` at the top of a script or function. Several language features, like "classes" and "modules", enable strict mode automatically.
3. Strict mode is supported by all modern browsers. As of now, we've got to know about `use strict` in general.
4. We recommended always starting scripts with `"use strict"`. All examples in this tutorial assume strict mode unless (very rarely) specified otherwise.
In the next chapters, as we learn language features, we'll see the differences between the strict and old modes. Luckily, there aren't many and they actually make our lives better.
All examples in this tutorial assume strict mode unless (very rarely) specified otherwise.

View file

@ -6,7 +6,7 @@ That's simple:
let ourPlanetName = "Earth"; let ourPlanetName = "Earth";
``` ```
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. 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.
## The name of the current visitor ## The name of the current visitor

View file

@ -12,13 +12,14 @@ const birthday = '18.04.1982';
const age = someCode(birthday); const age = someCode(birthday);
``` ```
Here we have a constant `birthday` date and the `age` is calculated from `birthday` with the help of some code (it is not provided for shortness, and because details don't matter here). Here we have a constant `birthday` for the date, and also the `age` constant.
The `age` is calculated from `birthday` using `someCode()`, which means a function call that we didn't explain yet (we will soon!), but the details don't matter here, the point is that `age` is calculated somehow based on the `birthday`.
Would it be right to use upper case for `birthday`? For `age`? Or even for both? Would it be right to use upper case for `birthday`? For `age`? Or even for both?
```js ```js
const BIRTHDAY = '18.04.1982'; // make uppercase? const BIRTHDAY = '18.04.1982'; // make birthday uppercase?
const AGE = someCode(BIRTHDAY); // make uppercase? const AGE = someCode(BIRTHDAY); // make age uppercase?
``` ```

View file

@ -24,7 +24,7 @@ Now, we can put some data into it by using the assignment operator `=`:
let message; let message;
*!* *!*
message = 'Hello'; // store the string message = 'Hello'; // store the string 'Hello' in the variable named message
*/!* */!*
``` ```
@ -64,6 +64,7 @@ let message = 'Hello';
``` ```
Some people also define multiple variables in this multiline style: Some people also define multiple variables in this multiline style:
```js no-beautify ```js no-beautify
let user = 'John', let user = 'John',
age = 25, age = 25,
@ -80,7 +81,6 @@ let user = 'John'
Technically, all these variants do the same thing. So, it's a matter of personal taste and aesthetics. Technically, all these variants do the same thing. So, it's a matter of personal taste and aesthetics.
````smart header="`var` instead of `let`" ````smart header="`var` instead of `let`"
In older scripts, you may also find another keyword: `var` instead of `let`: In older scripts, you may also find another keyword: `var` instead of `let`:
@ -104,6 +104,7 @@ For instance, the variable `message` can be imagined as a box labeled `"message"
We can put any value in the box. We can put any value in the box.
We can also change it as many times as we want: We can also change it as many times as we want:
```js run ```js run
let message; let message;
@ -135,6 +136,20 @@ alert(hello); // Hello world!
alert(message); // Hello world! alert(message); // Hello world!
``` ```
````warn header="Declaring twice triggers an error"
A variable should be declared only once.
A repeated declaration of the same variable is an error:
```js run
let message = "This";
// repeated 'let' leads to an error
let message = "That"; // SyntaxError: 'message' has already been declared
```
So, we should declare a variable once and then refer to it without `let`.
````
```smart header="Functional languages" ```smart header="Functional languages"
It's interesting to note that there exist [functional](https://en.wikipedia.org/wiki/Functional_programming) programming languages, like [Scala](http://www.scala-lang.org/) or [Erlang](http://www.erlang.org/) that forbid changing variable values. It's interesting to note that there exist [functional](https://en.wikipedia.org/wiki/Functional_programming) programming languages, like [Scala](http://www.scala-lang.org/) or [Erlang](http://www.erlang.org/) that forbid changing variable values.
@ -179,7 +194,7 @@ let my-name; // hyphens '-' aren't allowed in the name
``` ```
```smart header="Case matters" ```smart header="Case matters"
Variables named `apple` and `AppLE` are two different variables. Variables named `apple` and `APPLE` are two different variables.
``` ```
````smart header="Non-Latin letters are allowed, but not recommended" ````smart header="Non-Latin letters are allowed, but not recommended"
@ -190,7 +205,7 @@ let имя = '...';
let 我 = '...'; let 我 = '...';
``` ```
Technically, there is no error here, such names are allowed, but there is an international tradition to use English in variable names. Even if we're writing a small script, it may have a long life ahead. People from other countries may need to read it some time. Technically, there is no error here. Such names are allowed, but there is an international convention to use English in variable names. Even if we're writing a small script, it may have a long life ahead. People from other countries may need to read it some time.
```` ````
````warn header="Reserved names" ````warn header="Reserved names"
@ -247,7 +262,6 @@ myBirthday = '01.01.2001'; // error, can't reassign the constant!
When a programmer is sure that a variable will never change, they can declare it with `const` to guarantee and clearly communicate that fact to everyone. When a programmer is sure that a variable will never change, they can declare it with `const` to guarantee and clearly communicate that fact to everyone.
### Uppercase constants ### Uppercase constants
There is a widespread practice to use constants as aliases for difficult-to-remember values that are known prior to execution. There is a widespread practice to use constants as aliases for difficult-to-remember values that are known prior to execution.
@ -278,6 +292,7 @@ When should we use capitals for a constant and when should we name it normally?
Being a "constant" just means that a variable's value never changes. But there are constants that are known prior to execution (like a hexadecimal value for red) and there are constants that are *calculated* in run-time, during the execution, but do not change after their initial assignment. Being a "constant" just means that a variable's value never changes. But there are constants that are known prior to execution (like a hexadecimal value for red) and there are constants that are *calculated* in run-time, during the execution, but do not change after their initial assignment.
For instance: For instance:
```js ```js
const pageLoadTime = /* time taken by a webpage to load */; const pageLoadTime = /* time taken by a webpage to load */;
``` ```

View file

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="392" height="192" viewBox="0 0 392 192"><defs><style>@import url(https://fonts.googleapis.com/css?family=Open+Sans:bold,italic,bolditalic%7CPT+Mono);@font-face{font-family:&apos;PT Mono&apos;;font-weight:700;font-style:normal;src:local(&apos;PT MonoBold&apos;),url(/font/PTMonoBold.woff2) format(&apos;woff2&apos;),url(/font/PTMonoBold.woff) format(&apos;woff&apos;),url(/font/PTMonoBold.ttf) format(&apos;truetype&apos;)}</style></defs><g id="combined" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="variable-change.svg"><g id="noun_1211_cc" transform="translate(52 -5)"><path id="Shape" fill="#E8C48F" d="M25 94.196h112.558v42.95c0 .373-.079.862-.279 1.294-.2.433-16.574 35.56-16.574 35.56v-54.36l16.854-25.444L156 66H43.44L25 94.196zM25 123V95l-15 28"/><g id="Rectangle-5-+-&quot;World!&quot;" transform="translate(0 57)"><path id="Rectangle-5" fill="#FFF9EB" stroke="#8A704D" stroke-width="2" d="M18.861 1.809L2 17.533l53.14 56.986L72 58.794 18.861 1.81z"/><text id="&quot;World!&quot;" fill="#8A704D" font-family="OpenSans-Bold, Open Sans" font-size="14" font-weight="bold" transform="rotate(47 40.083 39.762)"><tspan x="10.591" y="46.262">&quot;World!&quot;</tspan></text></g><g id="Rectangle-5-+-&quot;World!&quot;-2" transform="rotate(-67 96.824 -33.912)"><path id="Rectangle-5" fill="#FFF9EB" stroke="#8A704D" stroke-width="2" d="M18.861 1.809L2 17.533l53.14 56.986L72 58.794 18.861 1.81z"/><text id="&quot;Hello!&quot;" fill="#8A704D" font-family="OpenSans-Bold, Open Sans" font-size="14" font-weight="bold" transform="rotate(47 40.083 39.762)"><tspan x="10.591" y="46.262">&quot;Hello!&quot;</tspan></text></g><path id="Shape" fill="#E8C48F" d="M8 125v54.73c0 3.42 1.484 5.27 4.387 5.27h100.086c3.122 0 5.527-2.548 5.527-3.476V125H8z"/></g><text id="message" fill="#FFF" font-family="OpenSans-Bold, Open Sans" font-size="18" font-weight="bold"><tspan x="77" y="157">message</tspan></text><path id="Fill-54" fill="#E8C48F" d="M58.112 51.808S47.657 40.623 40.719 36.155l-.505 5.542a76.036 76.036 0 00-33.769 4.595l4.169 11.032a64.248 64.248 0 0128.531-3.882l-.505 5.542c5.581-3.329 19.472-7.176 19.472-7.176" transform="rotate(11 32.278 47.57)"/><path id="Fill-54" fill="#E8C48F" d="M287.797 28.186s-10.454-11.185-17.393-15.653l-.505 5.541a76.036 76.036 0 00-33.769 4.596l4.169 11.032a64.248 64.248 0 0128.531-3.882l-.504 5.541c5.58-3.328 19.47-7.175 19.47-7.175" transform="rotate(2 261.964 23.947)"/><g id="noun_48910_cc" transform="translate(298 5)"><path id="Shape" d="M50.983 6H36.016C35.456 6 35 6.626 35 7.395V12h17V7.395C52 6.626 51.543 6 50.983 6z"/><path id="Shape" fill="#E8C48F" d="M84.193 9.36h-26.39V6.085C57.803 2.729 54.99 0 51.528 0H36.47c-3.46 0-6.275 2.729-6.275 6.085V9.36H3.807C1.705 9.36 0 11.012 0 13.05v.26C0 15.348 1.705 17 3.807 17h80.386C86.295 17 88 15.348 88 13.31v-.26c0-2.038-1.706-3.69-3.807-3.69zM53 12H36V7.395C36 6.626 36.457 6 37.016 6h14.968C52.544 6 53 6.626 53 7.395V12zM74.955 20.045H8.044c-3.89 0-7.044-.68-7.044 3.266l5.282 78.382c0 3.943 3.155 7.307 7.045 7.307h56.347c3.89 0 7.044-3.364 7.044-7.307L82 23.31c-.001-3.947-3.155-3.266-7.045-3.266zM26.757 98.999c-1.283.039-2.353-.8-2.396-1.878l-2.36-61.095c-.041-1.078.964-1.985 2.242-2.025 1.283-.04 2.353.801 2.396 1.879l2.36 61.096c.041 1.076-.963 1.984-2.242 2.023zM43 97.049C43 98.126 42.328 99 41.5 99s-1.5-.876-1.5-1.951V35.95c0-1.078.672-1.951 1.5-1.951s1.5.873 1.5 1.951V97.05zm18.639.072c-.042 1.078-1.113 1.917-2.396 1.878-1.28-.04-2.283-.947-2.242-2.024l2.36-61.095c.042-1.078 1.112-1.919 2.394-1.879 1.28.042 2.285.947 2.244 2.025l-2.36 61.095z"/></g></g></g></svg> <svg xmlns="http://www.w3.org/2000/svg" width="392" height="192" viewBox="0 0 392 192"><defs><style>@import url(https://fonts.googleapis.com/css?family=Open+Sans:bold,italic,bolditalic%7CPT+Mono);@font-face{font-family:&apos;PT Mono&apos;;font-weight:700;font-style:normal;src:local(&apos;PT MonoBold&apos;),url(/font/PTMonoBold.woff2) format(&apos;woff2&apos;),url(/font/PTMonoBold.woff) format(&apos;woff&apos;),url(/font/PTMonoBold.ttf) format(&apos;truetype&apos;)}</style></defs><g id="combined" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="variable-change.svg"><g id="noun_1211_cc" transform="translate(52.585 -3.958)"><path id="Shape" fill="#DBAF88" d="M24.415 93.154h112.557v42.95c0 .373-.078.863-.278 1.295-.2.432-16.575 35.56-16.575 35.56v-54.36l16.855-25.445 18.44-28.196H42.856l-18.44 28.196zM24.415 121.958v-28l-15 28"/><g id="Rectangle-5-+-&quot;World!&quot;" transform="translate(0 56.354)"><path id="Rectangle-5" fill="#FBF2EC" stroke="#AF6E24" stroke-width="2" d="M18.276 1.413L71.416 58.4 54.553 74.124 1.413 17.138 18.276 1.413z"/><text id="&quot;World!&quot;" fill="#AF6E24" font-family="OpenSans-Bold, Open Sans" font-size="14" font-weight="bold" transform="rotate(47 38.498 40.367)"><tspan x="9.006" y="46.867">&quot;World!&quot;</tspan></text></g><g id="Rectangle-5-+-&quot;World!&quot;-2" transform="rotate(-67 95.75 -34.63)"><path id="Rectangle-5" fill="#FBF2EC" stroke="#AF6E24" stroke-width="2" d="M18.276 1.413L71.416 58.4 54.553 74.124 1.413 17.138 18.276 1.413z"/><text id="&quot;Hello!&quot;" fill="#AF6E24" font-family="OpenSans-Bold, Open Sans" font-size="14" font-weight="bold" transform="rotate(47 38.578 39.758)"><tspan x="9.085" y="46.258">&quot;Hello!&quot;</tspan></text></g><path id="Shape" fill="#DBAF88" d="M7.415 123.958v54.73c0 3.42 1.483 5.27 4.387 5.27h100.086c3.122 0 5.527-2.547 5.527-3.475v-56.525h-110z"/></g><text id="message" fill="#FFF" font-family="OpenSans-Bold, Open Sans" font-size="18" font-weight="bold"><tspan x="77" y="157">message</tspan></text><path id="Fill-54" fill="#DBAF88" d="M58.112 51.808S47.657 40.623 40.719 36.155l-.505 5.542a76.036 76.036 0 00-33.769 4.595l4.169 11.032a64.248 64.248 0 0128.531-3.882l-.505 5.542c5.581-3.329 19.472-7.176 19.472-7.176" transform="rotate(11 32.278 47.57)"/><path id="Fill-54" fill="#DBAF88" d="M287.797 28.186s-10.454-11.185-17.393-15.653l-.505 5.541a76.036 76.036 0 00-33.769 4.596l4.169 11.032a64.248 64.248 0 0128.531-3.882l-.504 5.541c5.58-3.328 19.47-7.175 19.47-7.175" transform="rotate(2 261.964 23.947)"/><g id="noun_48910_cc" transform="translate(298 5)"><path id="Shape" d="M50.983 6H36.016C35.456 6 35 6.626 35 7.395V12h17V7.395C52 6.626 51.543 6 50.983 6z"/><path id="Shape" fill="#DBAF88" d="M84.193 9.36h-26.39V6.085C57.803 2.729 54.99 0 51.528 0H36.47c-3.46 0-6.275 2.729-6.275 6.085V9.36H3.807C1.705 9.36 0 11.012 0 13.05v.26C0 15.348 1.705 17 3.807 17h80.386C86.295 17 88 15.348 88 13.31v-.26c0-2.038-1.706-3.69-3.807-3.69zM53 12H36V7.395C36 6.626 36.457 6 37.016 6h14.968C52.544 6 53 6.626 53 7.395V12zM74.955 20.045H8.044c-3.89 0-7.044-.68-7.044 3.266l5.282 78.382c0 3.943 3.155 7.307 7.045 7.307h56.347c3.89 0 7.044-3.364 7.044-7.307L82 23.31c-.001-3.947-3.155-3.266-7.045-3.266zM26.757 98.999c-1.283.039-2.353-.8-2.396-1.878l-2.36-61.095c-.041-1.078.964-1.985 2.242-2.025 1.283-.04 2.353.801 2.396 1.879l2.36 61.096c.041 1.076-.963 1.984-2.242 2.023zM43 97.049C43 98.126 42.328 99 41.5 99s-1.5-.876-1.5-1.951V35.95c0-1.078.672-1.951 1.5-1.951s1.5.873 1.5 1.951V97.05zm18.639.072c-.042 1.078-1.113 1.917-2.396 1.878-1.28-.04-2.283-.947-2.242-2.024l2.36-61.095c.042-1.078 1.112-1.919 2.394-1.879 1.28.042 2.285.947 2.244 2.025l-2.36 61.095z"/></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Before After
Before After

View file

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="166" height="145" viewBox="0 0 166 145"><defs><style>@import url(https://fonts.googleapis.com/css?family=Open+Sans:bold,italic,bolditalic%7CPT+Mono);@font-face{font-family:&apos;PT Mono&apos;;font-weight:700;font-style:normal;src:local(&apos;PT MonoBold&apos;),url(/font/PTMonoBold.woff2) format(&apos;woff2&apos;),url(/font/PTMonoBold.woff) format(&apos;woff&apos;),url(/font/PTMonoBold.ttf) format(&apos;truetype&apos;)}</style></defs><g id="combined" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="variable.svg"><g id="noun_1211_cc-+-Message" transform="translate(13 3)"><g id="noun_1211_cc"><path id="Shape" fill="#E8C48F" d="M17 37.196h112.558v42.95c0 .373-.079.862-.279 1.294-.2.433-16.574 35.56-16.574 35.56V62.64l16.854-25.444L148 9H35.44L17 37.196zM17 66V38L2 66"/><g id="Rectangle-5-+-&quot;World!&quot;" transform="translate(15)"><path id="Rectangle-5" fill="#FFF9EB" stroke="#8A704D" stroke-width="2" d="M18.861 1.809L2 17.533l53.14 56.986L72 58.794 18.861 1.81z"/><text id="&quot;Hello!&quot;" fill="#8A704D" font-family="OpenSans-Bold, Open Sans" font-size="14" font-weight="bold" transform="rotate(47 40.083 39.762)"><tspan x="10.591" y="46.262">&quot;Hello!&quot;</tspan></text></g><path id="Shape" fill="#E8C48F" d="M0 68v54.73c0 3.42 1.484 5.27 4.387 5.27h100.086c3.122 0 5.527-2.548 5.527-3.476V68H0z"/></g><text id="message" fill="#FFF" font-family="OpenSans-Bold, Open Sans" font-size="18" font-weight="bold"><tspan x="17" y="105">message</tspan></text></g></g></g></svg> <svg xmlns="http://www.w3.org/2000/svg" width="166" height="145" viewBox="0 0 166 145"><defs><style>@import url(https://fonts.googleapis.com/css?family=Open+Sans:bold,italic,bolditalic%7CPT+Mono);@font-face{font-family:&apos;PT Mono&apos;;font-weight:700;font-style:normal;src:local(&apos;PT MonoBold&apos;),url(/font/PTMonoBold.woff2) format(&apos;woff2&apos;),url(/font/PTMonoBold.woff) format(&apos;woff&apos;),url(/font/PTMonoBold.ttf) format(&apos;truetype&apos;)}</style></defs><g id="combined" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="noun_1211_cc-+-Message" transform="translate(13 3)"><g id="noun_1211_cc"><path id="Shape" fill="#DBAF88" d="M17 37.196h112.558v42.95c0 .373-.079.862-.279 1.294-.2.433-16.574 35.56-16.574 35.56V62.64l16.854-25.444L148 9H35.44L17 37.196zM17 66V38L2 66"/><g id="Rectangle-5-+-&quot;World!&quot;" transform="translate(15)"><path id="Rectangle-5" fill="#FBF2EC" stroke="#AF6E24" stroke-width="2" d="M18.861 1.809l53.14 56.985L55.14 74.52 1.999 17.533 18.86 1.81z"/><text id="&quot;Hello!&quot;" fill="#AF6E24" font-family="OpenSans-Bold, Open Sans" font-size="14" font-weight="bold" transform="rotate(47 40.083 39.762)"><tspan x="10.591" y="46.262">&quot;Hello!&quot;</tspan></text></g><path id="Shape" fill="#DBAF88" d="M0 68v54.73c0 3.42 1.484 5.27 4.387 5.27h100.086c3.122 0 5.527-2.548 5.527-3.476V68H0z"/></g><text id="message" fill="#FFF" font-family="OpenSans-Bold, Open Sans" font-size="18" font-weight="bold"><tspan x="17" y="105">message</tspan></text></g></g></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before After
Before After

View file

@ -1,6 +1,10 @@
# Data types # Data types
A variable in JavaScript can contain any data. A variable can at one moment be a string and at another be a number: A value in JavaScript is always of a certain type. For example, a string or a number.
There are eight basic data types in JavaScript. Here, we'll cover them in general and in the next chapters we'll talk about each of them in detail.
We can put any type in a variable. For example, a variable can at one moment be a string and then store a number:
```js ```js
// no error // no error
@ -8,9 +12,7 @@ let message = "hello";
message = 123456; message = 123456;
``` ```
Programming languages that allow such things are called "dynamically typed", meaning that there are data types, but variables are not bound to any of them. Programming languages that allow such things, such as JavaScript, are called "dynamically typed", meaning that there exist data types, but variables are not bound to any of them.
There are eight basic data types in JavaScript. Here, we'll cover them in general and in the next chapters we'll talk about each of them in detail.
## Number ## Number
@ -44,13 +46,15 @@ Besides regular numbers, there are so-called "special numeric values" which also
alert( "not a number" / 2 ); // NaN, such division is erroneous alert( "not a number" / 2 ); // NaN, such division is erroneous
``` ```
`NaN` is sticky. Any further operation on `NaN` returns `NaN`: `NaN` is sticky. Any further mathematical operation on `NaN` returns `NaN`:
```js run ```js run
alert( "not a number" / 2 + 5 ); // NaN alert( NaN + 1 ); // NaN
alert( 3 * NaN ); // NaN
alert( "not a number" / 2 - 1 ); // NaN
``` ```
So, if there's a `NaN` somewhere in a mathematical expression, it propagates to the whole result. So, if there's a `NaN` somewhere in a mathematical expression, it propagates to the whole result (there's only one exception to that: `NaN ** 0` is `1`).
```smart header="Mathematical operations are safe" ```smart header="Mathematical operations are safe"
Doing maths is "safe" in JavaScript. We can do anything: divide by zero, treat non-numeric strings as numbers, etc. Doing maths is "safe" in JavaScript. We can do anything: divide by zero, treat non-numeric strings as numbers, etc.
@ -62,25 +66,41 @@ Special numeric values formally belong to the "number" type. Of course they are
We'll see more about working with numbers in the chapter <info:number>. We'll see more about working with numbers in the chapter <info:number>.
## BigInt ## BigInt [#bigint-type]
In JavaScript, the "number" type cannot represent integer values larger than <code>2<sup>53</sup></code> (or less than <code>-2<sup>53</sup></code> for negatives), that's a technical limitation caused by their internal representation. That's about 16 decimal digits, so for most purposes the limitation isn't a problem, but sometimes we need really big numbers, e.g. for cryptography or microsecond-precision timestamps. In JavaScript, the "number" type cannot safely represent integer values larger than <code>(2<sup>53</sup>-1)</code> (that's `9007199254740991`), or less than <code>-(2<sup>53</sup>-1)</code> for negatives.
To be really precise, the "number" type can store larger integers (up to <code>1.7976931348623157 * 10<sup>308</sup></code>), but outside of the safe integer range <code>±(2<sup>53</sup>-1)</code> there'll be a precision error, because not all digits fit into the fixed 64-bit storage. So an "approximate" value may be stored.
For example, these two numbers (right above the safe range) are the same:
```js
console.log(9007199254740991 + 1); // 9007199254740992
console.log(9007199254740991 + 2); // 9007199254740992
```
So to say, all odd integers greater than <code>(2<sup>53</sup>-1)</code> can't be stored at all in the "number" type.
For most purposes <code>±(2<sup>53</sup>-1)</code> range is quite enough, but sometimes we need the entire range of really big integers, e.g. for cryptography or microsecond-precision timestamps.
`BigInt` type was recently added to the language to represent integers of arbitrary length. `BigInt` type was recently added to the language to represent integers of arbitrary length.
A `BigInt` is created by appending `n` to the end of an integer literal: A `BigInt` value is created by appending `n` to the end of an integer:
```js ```js
// the "n" at the end means it's a BigInt // the "n" at the end means it's a BigInt
const bigInt = 1234567890123456789012345678901234567890n; const bigInt = 1234567890123456789012345678901234567890n;
``` ```
As `BigInt` numbers are rarely needed, we devoted them a separate chapter <info:bigint>. 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.
```smart header="Compatability issues"
Right now `BigInt` is supported in Firefox and Chrome, but not in Safari/IE/Edge. ```smart header="Compatibility issues"
Right now, `BigInt` is supported in Firefox/Chrome/Edge/Safari, but not in IE.
``` ```
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.
## String ## String
A string in JavaScript must be surrounded by quotes. A string in JavaScript must be surrounded by quotes.
@ -123,7 +143,7 @@ We'll cover strings more thoroughly in the chapter <info:string>.
```smart header="There is no *character* type." ```smart header="There is no *character* type."
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". 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".
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. 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.
``` ```
## Boolean (logical type) ## Boolean (logical type)
@ -163,7 +183,7 @@ In JavaScript, `null` is not a "reference to a non-existing object" or a "null p
It's just a special value which represents "nothing", "empty" or "value unknown". It's just a special value which represents "nothing", "empty" or "value unknown".
The code above states that `age` is unknown or empty for some reason. The code above states that `age` is unknown.
## The "undefined" value ## The "undefined" value
@ -174,43 +194,39 @@ The meaning of `undefined` is "value is not assigned".
If a variable is declared, but not assigned, then its value is `undefined`: If a variable is declared, but not assigned, then its value is `undefined`:
```js run ```js run
let x; let age;
alert(x); // shows "undefined" alert(age); // shows "undefined"
``` ```
Technically, it is possible to assign `undefined` to any variable: Technically, it is possible to explicitly assign `undefined` to a variable:
```js run ```js run
let x = 123; let age = 100;
x = undefined; // change the value to undefined
age = undefined;
alert(x); // "undefined" alert(age); // "undefined"
``` ```
...But we don't recommend doing that. Normally, we use `null` to assign an "empty" or "unknown" value to a variable, and we use `undefined` for checks like seeing if a variable has been assigned. ...But we don't recommend doing that. Normally, one uses `null` to assign an "empty" or "unknown" value to a variable, while `undefined` is reserved as a default initial value for unassigned things.
## Objects and Symbols ## Objects and Symbols
The `object` type is special. The `object` type is special.
All other types are called "primitive" because their values can contain only a single thing (be it a string or a number or whatever). In contrast, objects are used to store collections of data and more complex entities. We'll deal with them later in the chapter <info:object> after we learn more about primitives. All other types are called "primitive" because their values can contain only a single thing (be it a string or a number or whatever). In contrast, objects are used to store collections of data and more complex entities.
The `symbol` type is used to create unique identifiers for objects. We mention it here for completeness, but we'll study it after objects. Being that important, objects deserve a special treatment. We'll deal with them later in the chapter <info:object>, after we learn more about primitives.
The `symbol` type is used to create unique identifiers for objects. We have to mention it here for the sake of completeness, but also postpone the details till we know objects.
## The typeof operator [#type-typeof] ## The typeof operator [#type-typeof]
The `typeof` operator returns the type of the argument. It's useful when we want to process values of different types differently or just want to do a quick check. The `typeof` operator returns the type of the argument. It's useful when we want to process values of different types differently or just want to do a quick check.
It supports two forms of syntax: A call to `typeof x` returns a string with the type name:
1. As an operator: `typeof x`.
2. As a function: `typeof(x)`.
In other words, it works with parentheses or without them. The result is the same.
The call to `typeof x` returns a string with the type name:
```js ```js
typeof undefined // "undefined" typeof undefined // "undefined"
@ -241,25 +257,37 @@ typeof alert // "function" (3)
The last three lines may need additional explanation: The last three lines may need additional explanation:
1. `Math` is a built-in object that provides mathematical operations. We will learn it in the chapter <info:number>. Here, it serves just as an example of an object. 1. `Math` is a built-in object that provides mathematical operations. We will learn it in the chapter <info:number>. Here, it serves just as an example of an object.
2. The result of `typeof null` is `"object"`. That's wrong. It is an officially recognized error in `typeof`, kept for compatibility. Of course, `null` is not an object. It is a special value with a separate type of its own. So, again, this is an error in the language. 2. The result of `typeof null` is `"object"`. That's an officially recognized error in `typeof`, coming from very early days of JavaScript and kept for compatibility. Definitely, `null` is not an object. It is a special value with a separate type of its own. The behavior of `typeof` is wrong here.
3. The result of `typeof alert` is `"function"`, because `alert` is a function. We'll study functions in the next chapters where we'll also see that there's no special "function" type in JavaScript. Functions belong to the object type. But `typeof` treats them differently, returning `"function"`. That's not quite correct, but very convenient in practice. 3. The result of `typeof alert` is `"function"`, because `alert` is a function. We'll study functions in the next chapters where we'll also see that there's no special "function" type in JavaScript. Functions belong to the object type. But `typeof` treats them differently, returning `"function"`. That also comes from the early days of JavaScript. Technically, such behavior isn't correct, but can be convenient in practice.
```smart header="The `typeof(x)` syntax"
You may also come across another syntax: `typeof(x)`. It's the same as `typeof x`.
To put it clear: `typeof` is an operator, not a function. The parentheses here aren't a part of `typeof`. It's the kind of parentheses used for mathematical grouping.
Usually, such parentheses contain a mathematical expression, such as `(2 + 2)`, but here they contain only one argument `(x)`. Syntactically, they allow to avoid a space between the `typeof` operator and its argument, and some people like it.
Some people prefer `typeof(x)`, although the `typeof x` syntax is much more common.
```
## Summary ## Summary
There are 8 basic data types in JavaScript. There are 8 basic data types in JavaScript.
- `number` for numbers of any kind: integer or floating-point, integers are limited by ±2<sup>53</sup>. - Seven primitive data types:
- `bigint` is for integer numbers of arbitrary length. - `number` for numbers of any kind: integer or floating-point, integers are limited by <code>±(2<sup>53</sup>-1)</code>.
- `string` for strings. A string may have one or more characters, there's no separate single-character type. - `bigint` for integer numbers of arbitrary length.
- `boolean` for `true`/`false`. - `string` for strings. A string may have zero or more characters, there's no separate single-character type.
- `null` for unknown values -- a standalone type that has a single value `null`. - `boolean` for `true`/`false`.
- `undefined` for unassigned values -- a standalone type that has a single value `undefined`. - `null` for unknown values -- a standalone type that has a single value `null`.
- `object` for more complex data structures. - `undefined` for unassigned values -- a standalone type that has a single value `undefined`.
- `symbol` for unique identifiers. - `symbol` for unique identifiers.
- And one non-primitive data type:
- `object` for more complex data structures.
The `typeof` operator allows us to see which type is stored in a variable. The `typeof` operator allows us to see which type is stored in a variable.
- Two forms: `typeof x` or `typeof(x)`. - Usually used as `typeof x`, but `typeof(x)` is also possible.
- Returns a string with the name of the type, like `"string"`. - Returns a string with the name of the type, like `"string"`.
- For `null` returns `"object"` -- this is an error in the language, it's not actually an object. - For `null` returns `"object"` -- this is an error in the language, it's not actually an object.

View file

@ -1,18 +1,10 @@
# Interaction: alert, prompt, confirm # Interaction: alert, prompt, confirm
In this part of the tutorial we cover JavaScript language "as is", without environment-specific tweaks. As we'll be using the browser as our demo environment, let's see a couple of functions to interact with the user: `alert`, `prompt` and `confirm`.
But we'll still be using the browser as our demo environment, so we should know at least a few of its user-interface functions. In this chapter, we'll get familiar with the browser functions `alert`, `prompt` and `confirm`.
## alert ## alert
Syntax: This one we've seen already. It shows a message and waits for the user to press "OK".
```js
alert(message);
```
This shows a message and pauses script execution until the user presses "OK".
For example: For example:
@ -20,7 +12,7 @@ For example:
alert("Hello"); alert("Hello");
``` ```
The mini-window with the message is called a *modal window*. The word "modal" means that the visitor can't interact with the rest of the page, press other buttons, etc. until they have dealt with the window. In this case -- until they press "OK". The mini-window with the message is called a *modal window*. The word "modal" means that the visitor can't interact with the rest of the page, press other buttons, etc, until they have dealt with the window. In this case -- until they press "OK".
## prompt ## prompt
@ -38,7 +30,11 @@ It shows a modal window with a text message, an input field for the visitor, and
`default` `default`
: An optional second parameter, the initial value for the input field. : An optional second parameter, the initial value for the input field.
The visitor may type something in the prompt input field and press OK. Or they can cancel the input by pressing Cancel or hitting the `key:Esc` key. ```smart header="The square brackets in syntax `[...]`"
The square brackets around `default` in the syntax above denote that the parameter is optional, not required.
```
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`.
The call to `prompt` returns the text from the input field or `null` if the input was canceled. The call to `prompt` returns the text from the input field or `null` if the input was canceled.

View file

@ -7,7 +7,9 @@ For example, `alert` automatically converts any value to a string to show it. Ma
There are also cases when we need to explicitly convert a value to the expected type. There are also cases when we need to explicitly convert a value to the expected type.
```smart header="Not talking about objects yet" ```smart header="Not talking about objects yet"
In this chapter, we won't cover objects. Instead, we'll study primitives first. Later, after we learn about objects, we'll see how object conversion works in the chapter <info:object-toprimitive>. In this chapter, we won't cover objects. For now, we'll just be talking about primitives.
Later, after we learn about objects, in the chapter <info:object-toprimitive> we'll see how objects fit in.
``` ```
## String Conversion ## String Conversion
@ -68,7 +70,7 @@ Numeric conversion rules:
|`undefined`|`NaN`| |`undefined`|`NaN`|
|`null`|`0`| |`null`|`0`|
|<code>true&nbsp;and&nbsp;false</code> | `1` and `0` | |<code>true&nbsp;and&nbsp;false</code> | `1` and `0` |
| `string` | Whitespaces from the start and end are removed. If the remaining string is empty, the result is `0`. Otherwise, the number is "read" from the string. An error gives `NaN`. | | `string` | Whitespaces (includes spaces, tabs `\t`, newlines `\n` etc.) from the start and end are removed. If the remaining string is empty, the result is `0`. Otherwise, the number is "read" from the string. An error gives `NaN`. |
Examples: Examples:
@ -128,7 +130,7 @@ The conversion follows the rules:
|`undefined`|`NaN`| |`undefined`|`NaN`|
|`null`|`0`| |`null`|`0`|
|<code>true&nbsp;/&nbsp;false</code> | `1 / 0` | |<code>true&nbsp;/&nbsp;false</code> | `1 / 0` |
| `string` | The string is read "as is", whitespaces from both sides are ignored. An empty string becomes `0`. An error gives `NaN`. | | `string` | The string is read "as is", whitespaces (includes spaces, tabs `\t`, newlines `\n` etc.) from both sides are ignored. An empty string becomes `0`. An error gives `NaN`. |
**`Boolean Conversion`** -- Occurs in logical operations. Can be performed with `Boolean(value)`. **`Boolean Conversion`** -- Occurs in logical operations. Can be performed with `Boolean(value)`.

View file

@ -9,7 +9,6 @@ true + false = 1
"$" + 4 + 5 = "$45" "$" + 4 + 5 = "$45"
"4" - 2 = 2 "4" - 2 = 2
"4px" - 2 = NaN "4px" - 2 = NaN
7 / 0 = Infinity
" -9 " + 5 = " -9 5" // (3) " -9 " + 5 = " -9 5" // (3)
" -9 " - 5 = -14 // (4) " -9 " - 5 = -14 // (4)
null + 1 = 1 // (5) null + 1 = 1 // (5)
@ -23,4 +22,4 @@ undefined + 1 = NaN // (6)
4. The subtraction always converts to numbers, so it makes `" -9 "` a number `-9` (ignoring spaces around it). 4. The subtraction always converts to numbers, so it makes `" -9 "` a number `-9` (ignoring spaces around it).
5. `null` becomes `0` after the numeric conversion. 5. `null` becomes `0` after the numeric conversion.
6. `undefined` becomes `NaN` after the numeric conversion. 6. `undefined` becomes `NaN` after the numeric conversion.
7. Space characters, are trimmed off string start and end when a string is converted to a number. Here the whole string consists of space characters, such as `\t`, `\n` and a "regular" space between them. So, similarly to an empty string, it becomes `0`. 7. Space characters are trimmed off string start and end when a string is converted to a number. Here the whole string consists of space characters, such as `\t`, `\n` and a "regular" space between them. So, similarly to an empty string, it becomes `0`.

View file

@ -16,7 +16,6 @@ true + false
"$" + 4 + 5 "$" + 4 + 5
"4" - 2 "4" - 2
"4px" - 2 "4px" - 2
7 / 0
" -9 " + 5 " -9 " + 5
" -9 " - 5 " -9 " - 5
null + 1 null + 1

View file

@ -0,0 +1,32 @@
The reason is that prompt returns user input as a string.
So variables have values `"1"` and `"2"` respectively.
```js run
let a = "1"; // prompt("First number?", 1);
let b = "2"; // prompt("Second number?", 2);
alert(a + b); // 12
```
What we should do is to convert strings to numbers before `+`. For example, using `Number()` or prepending them with `+`.
For example, right before `prompt`:
```js run
let a = +prompt("First number?", 1);
let b = +prompt("Second number?", 2);
alert(a + b); // 3
```
Or in the `alert`:
```js run
let a = prompt("First number?", 1);
let b = prompt("Second number?", 2);
alert(+a + +b); // 3
```
Using both unary and binary `+` in the latest code. Looks funny, doesn't it?

View file

@ -0,0 +1,18 @@
importance: 5
---
# Fix the addition
Here's a code that asks the user for two numbers and shows their sum.
It works incorrectly. The output in the example below is `12` (for default prompt values).
Why? Fix it. The result should be `3`.
```js run
let a = prompt("First number?", 1);
let b = prompt("Second number?", 2);
alert(a + b); // 12
```

View file

@ -1,8 +1,8 @@
# Operators # Basic operators, maths
We know many operators from school. They are things like addition `+`, multiplication `*`, subtraction `-`, and so on. We know many operators from school. They are things like addition `+`, multiplication `*`, subtraction `-`, and so on.
In this chapter, we'll concentrate on aspects of operators that are not covered by school arithmetic. In this chapter, well start with simple operators, then concentrate on JavaScript-specific aspects, not covered by school arithmetic.
## Terms: "unary", "binary", "operand" ## Terms: "unary", "binary", "operand"
@ -28,9 +28,59 @@ Before we move on, let's grasp some common terminology.
Formally, in the examples above we have two different operators that share the same symbol: the negation operator, a unary operator that reverses the sign, and the subtraction operator, a binary operator that subtracts one number from another. Formally, in the examples above we have two different operators that share the same symbol: the negation operator, a unary operator that reverses the sign, and the subtraction operator, a binary operator that subtracts one number from another.
## String concatenation, binary + ## Maths
Now, let's see special features of JavaScript operators that are beyond school arithmetics. The following math operations are supported:
- Addition `+`,
- Subtraction `-`,
- Multiplication `*`,
- Division `/`,
- Remainder `%`,
- Exponentiation `**`.
The first four are straightforward, while `%` and `**` need a few words about them.
### Remainder %
The remainder operator `%`, despite its appearance, is not related to percents.
The result of `a % b` is the [remainder](https://en.wikipedia.org/wiki/Remainder) of the integer division of `a` by `b`.
For instance:
```js run
alert( 5 % 2 ); // 1, a remainder of 5 divided by 2
alert( 8 % 3 ); // 2, a remainder of 8 divided by 3
```
### Exponentiation **
The exponentiation operator `a ** b` raises `a` to the power of `b`.
In school maths, we write that as a<sup>b</sup>.
For instance:
```js run
alert( 2 ** 2 ); // 2² = 4
alert( 2 ** 3 ); // 2³ = 8
alert( 2 ** 4 ); // 2⁴ = 16
```
Just like in maths, the exponentiation operator is defined for non-integer numbers as well.
For example, a square root is an exponentiation by ½:
```js run
alert( 4 ** (1/2) ); // 2 (power of 1/2 is the same as a square root)
alert( 8 ** (1/3) ); // 2 (power of 1/3 is the same as a cubic root)
```
## String concatenation with binary +
Let's meet features of JavaScript operators that are beyond school arithmetics.
Usually, the plus operator `+` sums numbers. Usually, the plus operator `+` sums numbers.
@ -41,7 +91,7 @@ let s = "my" + "string";
alert(s); // mystring alert(s); // mystring
``` ```
Note that if one of the operands is a string, the other one is converted to a string too. Note that if any of the operands is a string, then the other one is converted to a string too.
For example: For example:
@ -50,22 +100,28 @@ alert( '1' + 2 ); // "12"
alert( 2 + '1' ); // "21" alert( 2 + '1' ); // "21"
``` ```
See, it doesn't matter whether the first operand is a string or the second one. The rule is simple: if either operand is a string, the other one is converted into a string as well. See, it doesn't matter whether the first operand is a string or the second one.
However, note that operations run from left to right. If there are two numbers followed by a string, the numbers will be added before being converted to a string:
Here's a more complex example:
```js run ```js run
alert(2 + 2 + '1' ); // "41" and not "221" alert(2 + 2 + '1' ); // "41" and not "221"
``` ```
String concatenation and conversion is a special feature of the binary plus `+`. Other arithmetic operators work only with numbers and always convert their operands to numbers. 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'`.
For instance, subtraction and division:
```js run ```js run
alert( 2 - '1' ); // 1 alert('1' + 2 + 2); // "122" and not "14"
alert( '6' / '2' ); // 3 ```
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"`.
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.
Here's the demo for subtraction and division:
```js run
alert( 6 - '2' ); // 4, converts '2' to a number
alert( '6' / '2' ); // 3, converts both operands to numbers
``` ```
## Numeric conversion, unary + ## Numeric conversion, unary +
@ -133,26 +189,27 @@ Parentheses override any precedence, so if we're not satisfied with the default
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. 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.
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): 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):
| Precedence | Name | Sign | | Precedence | Name | Sign |
|------------|------|------| |------------|------|------|
| ... | ... | ... | | ... | ... | ... |
| 16 | unary plus | `+` | | 14 | unary plus | `+` |
| 16 | unary negation | `-` | | 14 | unary negation | `-` |
| 14 | multiplication | `*` | | 13 | exponentiation | `**` |
| 14 | division | `/` | | 12 | multiplication | `*` |
| 13 | addition | `+` | | 12 | division | `/` |
| 13 | subtraction | `-` | | 11 | addition | `+` |
| 11 | subtraction | `-` |
| ... | ... | ... | | ... | ... | ... |
| 3 | assignment | `=` | | 2 | assignment | `=` |
| ... | ... | ... | | ... | ... | ... |
As we can see, the "unary plus" has a priority of `16` which is higher than the `13` of "addition" (binary plus). That's why, in the expression `"+apples + +oranges"`, unary pluses work before the addition. As we can see, the "unary plus" has a priority of `14` which is higher than the `11` of "addition" (binary plus). That's why, in the expression `"+apples + +oranges"`, unary pluses work before the addition.
## Assignment ## Assignment
Let's note that an assignment `=` is also an operator. It is listed in the precedence table with the very low priority of `3`. Let's note that an assignment `=` is also an operator. It is listed in the precedence table with the very low priority of `2`.
That's why, when we assign a variable, like `x = 2 * 2 + 1`, the calculations are done first and then the `=` is evaluated, storing the result in `x`. That's why, when we assign a variable, like `x = 2 * 2 + 1`, the calculations are done first and then the `=` is evaluated, storing the result in `x`.
@ -162,24 +219,11 @@ let x = 2 * 2 + 1;
alert( x ); // 5 alert( x ); // 5
``` ```
It is possible to chain assignments: ### Assignment = returns a value
```js run The fact of `=` being an operator, not a "magical" language construct has an interesting implication.
let a, b, c;
*!* All operators in JavaScript return a value. That's obvious for `+` and `-`, but also true for `=`.
a = b = c = 2 + 2;
*/!*
alert( a ); // 4
alert( b ); // 4
alert( c ); // 4
```
Chained assignments evaluate from right to left. First, the rightmost expression `2 + 2` is evaluated and then assigned to the variables on the left: `c`, `b` and `a`. At the end, all the variables share a single value.
````smart header="The assignment operator `\"=\"` returns a value"
An operator always returns a value. That's obvious for most of them like addition `+` or multiplication `*`. But the assignment operator follows this rule too.
The call `x = value` writes the `value` into `x` *and then returns it*. The call `x = value` writes the `value` into `x` *and then returns it*.
@ -199,49 +243,74 @@ alert( c ); // 0
In the example above, the result of expression `(a = b + 1)` is the value which was assigned to `a` (that is `3`). It is then used for further evaluations. In the example above, the result of expression `(a = b + 1)` is the value which was assigned to `a` (that is `3`). It is then used for further evaluations.
Funny code, isn't it? We should understand how it works, because sometimes we see it in JavaScript libraries, but shouldn't write anything like that ourselves. Such tricks definitely don't make code clearer or readable. Funny code, isn't it? We should understand how it works, because sometimes we see it in JavaScript libraries.
````
## Remainder % Although, please don't write the code like that. Such tricks definitely don't make code clearer or readable.
The remainder operator `%`, despite its appearance, is not related to percents. ### Chaining assignments
The result of `a % b` is the remainder of the integer division of `a` by `b`. Another interesting feature is the ability to chain assignments:
For instance:
```js run ```js run
alert( 5 % 2 ); // 1 is a remainder of 5 divided by 2 let a, b, c;
alert( 8 % 3 ); // 2 is a remainder of 8 divided by 3
alert( 6 % 3 ); // 0 is a remainder of 6 divided by 3 *!*
a = b = c = 2 + 2;
*/!*
alert( a ); // 4
alert( b ); // 4
alert( c ); // 4
``` ```
## Exponentiation ** Chained assignments evaluate from right to left. First, the rightmost expression `2 + 2` is evaluated and then assigned to the variables on the left: `c`, `b` and `a`. At the end, all the variables share a single value.
The exponentiation operator `**` is a recent addition to the language. Once again, for the purposes of readability it's better to split such code into few lines:
For a natural number `b`, the result of `a ** b` is `a` multiplied by itself `b` times. ```js
c = 2 + 2;
b = c;
a = c;
```
That's easier to read, especially when eye-scanning the code fast.
For instance: ## Modify-in-place
```js run We often need to apply an operator to a variable and store the new result in that same variable.
alert( 2 ** 2 ); // 4 (2 * 2)
alert( 2 ** 3 ); // 8 (2 * 2 * 2) For example:
alert( 2 ** 4 ); // 16 (2 * 2 * 2 * 2)
```js
let n = 2;
n = n + 5;
n = n * 2;
``` ```
The operator works for non-integer numbers as well. This notation can be shortened using the operators `+=` and `*=`:
For instance:
```js run ```js run
alert( 4 ** (1/2) ); // 2 (power of 1/2 is the same as a square root, that's maths) let n = 2;
alert( 8 ** (1/3) ); // 2 (power of 1/3 is the same as a cubic root) n += 5; // now n = 7 (same as n = n + 5)
n *= 2; // now n = 14 (same as n = n * 2)
alert( n ); // 14
```
Short "modify-and-assign" operators exist for all arithmetical and bitwise operators: `/=`, `-=`, etc.
Such operators have the same precedence as a normal assignment, so they run after most other calculations:
```js run
let n = 2;
n *= 3 + 5; // right part evaluated first, same as n *= 8
alert( n ); // 16
``` ```
## Increment/decrement ## Increment/decrement
<!-- Can't use -- in title, because built-in parse turns it into --> <!-- Can't use -- in title, because the built-in parser turns it into a 'long dash' -->
Increasing or decreasing a number by one is among the most common numerical operations. Increasing or decreasing a number by one is among the most common numerical operations.
@ -368,41 +437,7 @@ The list of operators:
- RIGHT SHIFT ( `>>` ) - RIGHT SHIFT ( `>>` )
- ZERO-FILL RIGHT SHIFT ( `>>>` ) - ZERO-FILL RIGHT SHIFT ( `>>>` )
These operators are used very rarely. To understand them, we need to delve into low-level number representation and it would not be optimal to do that right now, especially since we won't need them any time soon. If you're curious, you can read the [Bitwise Operators](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators) article on MDN. It would be more practical to do that when a real need arises. 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_operators) chapter on MDN when a need arises.
## Modify-in-place
We often need to apply an operator to a variable and store the new result in that same variable.
For example:
```js
let n = 2;
n = n + 5;
n = n * 2;
```
This notation can be shortened using the operators `+=` and `*=`:
```js run
let n = 2;
n += 5; // now n = 7 (same as n = n + 5)
n *= 2; // now n = 14 (same as n = n * 2)
alert( n ); // 14
```
Short "modify-and-assign" operators exist for all arithmetical and bitwise operators: `/=`, `-=`, etc.
Such operators have the same precedence as a normal assignment, so they run after most other calculations:
```js run
let n = 2;
n *= 3 + 5;
alert( n ); // 16 (right part evaluated first, same as n *= 8)
```
## Comma ## Comma

View file

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

View file

@ -1,15 +1,21 @@
# Comparisons # Comparisons
We know many comparison operators from maths: We know many comparison operators from maths.
In JavaScript they are written like this:
- Greater/less than: <code>a &gt; b</code>, <code>a &lt; b</code>. - Greater/less than: <code>a &gt; b</code>, <code>a &lt; b</code>.
- Greater/less than or equals: <code>a &gt;= b</code>, <code>a &lt;= b</code>. - Greater/less than or equals: <code>a &gt;= b</code>, <code>a &lt;= b</code>.
- Equals: `a == b` (please note the double equals sign `=`. A single symbol `a = b` would mean an assignment). - Equals: `a == b`, please note the double equality sign `==` means the equality test, while a single one `a = b` means an assignment.
- Not equals. In maths the notation is <code>&ne;</code>, but in JavaScript it's written as an assignment with an exclamation sign before it: <code>a != b</code>. - Not equals: In maths the notation is <code>&ne;</code>, but in JavaScript it's written as <code>a != b</code>.
In this article we'll learn more about different types of comparisons, how JavaScript makes them, including important peculiarities.
At the end you'll find a good recipe to avoid "JavaScript quirks"-related issues.
## Boolean is the result ## Boolean is the result
Like all other operators, a comparison returns a value. In this case, the value is a boolean. All comparison operators return a boolean value:
- `true` -- means "yes", "correct" or "the truth". - `true` -- means "yes", "correct" or "the truth".
- `false` -- means "no", "wrong" or "not the truth". - `false` -- means "no", "wrong" or "not the truth".
@ -51,7 +57,9 @@ The algorithm to compare two strings is simple:
4. Repeat until the end of either string. 4. Repeat until the end of either string.
5. If both strings end at the same length, then they are equal. Otherwise, the longer string is greater. 5. If both strings end at the same length, then they are equal. Otherwise, the longer string is greater.
In the examples above, the comparison `'Z' > 'A'` gets to a result at the first step while the strings `"Glow"` and `"Glee"` are compared character-by-character: In the first example above, the comparison `'Z' > 'A'` gets to a result at the first step.
The second comparison `'Glow'` and `'Glee'` needs more steps as strings are compared character-by-character:
1. `G` is the same as `G`. 1. `G` is the same as `G`.
2. `l` is the same as `l`. 2. `l` is the same as `l`.
@ -192,13 +200,12 @@ We get these results because:
- Comparisons `(1)` and `(2)` return `false` because `undefined` gets converted to `NaN` and `NaN` is a special numeric value which returns `false` for all comparisons. - Comparisons `(1)` and `(2)` return `false` because `undefined` gets converted to `NaN` and `NaN` is a special numeric value which returns `false` for all comparisons.
- The equality check `(3)` returns `false` because `undefined` only equals `null`, `undefined`, and no other value. - The equality check `(3)` returns `false` because `undefined` only equals `null`, `undefined`, and no other value.
### Evade problems ### Avoid problems
Why did we go over these examples? Should we remember these peculiarities all the time? Well, not really. Actually, these tricky things will gradually become familiar over time, but there's a solid way to evade problems with them: Why did we go over these examples? Should we remember these peculiarities all the time? Well, not really. Actually, these tricky things will gradually become familiar over time, but there's a solid way to avoid problems with them:
Just treat any comparison with `undefined/null` except the strict equality `===` with exceptional care. - Treat any comparison with `undefined/null` except the strict equality `===` with exceptional care.
- Don't use comparisons `>= > < <=` with a variable which may be `null/undefined`, unless you're really sure of what you're doing. If a variable can have these values, check for them separately.
Don't use comparisons `>= > < <=` with a variable which may be `null/undefined`, unless you're really sure of what you're doing. If a variable can have these values, check for them separately.
## Summary ## Summary

View file

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="264" viewBox="0 0 500 264"><defs><style>@import url(https://fonts.googleapis.com/css?family=Open+Sans:bold,italic,bolditalic%7CPT+Mono);@font-face{font-family:&apos;PT Mono&apos;;font-weight:700;font-style:normal;src:local(&apos;PT MonoBold&apos;),url(/font/PTMonoBold.woff2) format(&apos;woff2&apos;),url(/font/PTMonoBold.woff) format(&apos;woff&apos;),url(/font/PTMonoBold.ttf) format(&apos;truetype&apos;)}</style></defs><g id="combined" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="ifelse_task2.svg"><path id="Path-1218-Copy" fill="#EE6B47" fill-rule="nonzero" d="M425.5 133.5v54h8l-9.5 19-9.5-19h8v-51h-82v-3h85z"/><g id="Rectangle-1-+-Корень" transform="translate(213 4)"><rect id="Rectangle-1" width="78" height="28" x="1" y="1" fill="#FFF9EB" stroke="#E8C48E" stroke-width="2" rx="14"/><text id="Begin" fill="#8A704D" font-family="OpenSans-Regular, Open Sans" font-size="14" font-weight="normal"><tspan x="21" y="19">Begin</tspan></text></g><g id="Rectangle-1-+-Корень-Copy-2" transform="translate(8 206)"><rect id="Rectangle-1" width="131" height="49" x="1" y="1" fill="#FFF9EB" stroke="#E8C48E" stroke-width="2" rx="24.5"/><text id="You-don't-know?-“ECM" fill="#8A704D" font-family="OpenSans-Regular, Open Sans" font-size="14" font-weight="normal"><tspan x="13.354" y="20">You don&apos;t know?</tspan> <tspan x="21.967" y="39">“ECMAScript”!</tspan></text></g><g id="Rectangle-1-+-Корень-Copy-3" transform="translate(354 206)"><rect id="Rectangle-1" width="131" height="49" x="1" y="1" fill="#FFF9EB" stroke="#E8C48E" stroke-width="2" rx="24.5"/><text id="Right!" fill="#8A704D" font-family="OpenSans-Regular, Open Sans" font-size="14" font-weight="normal"><tspan x="47.93" y="28">Right!</tspan></text></g><path id="Line" fill="#EE6B47" fill-rule="nonzero" d="M255 34v23.049l8 .001-9.5 19-9.5-19 8-.001V34h3z"/><path id="Path-1218" fill="#EE6B47" fill-rule="nonzero" d="M139.5 133.5v3h-59v51h8l-9.5 19-9.5-19h8v-54h62z"/><path id="Rectangle-356" fill="#FFF" d="M47 152h60v20H47z"/><g id="Rectangle-354-+-Каково-“официальное”" transform="translate(137 76)"><path id="Rectangle-354" fill="#FFF9EB" stroke="#E8C48E" stroke-width="2" d="M2.199 59.5L116.5 117.877 230.801 59.5 116.5 1.123 2.199 59.5z"/><text id="What's-the-“official" fill="#8A704D" font-family="OpenSans-Regular, Open Sans" font-size="14" font-weight="normal"><tspan x="81.026" y="43">What&apos;s the</tspan> <tspan x="60.635" y="62">“official” name of</tspan> <tspan x="80.77" y="81">JavaScript?</tspan></text></g><text id="Other" fill="#8A704D" font-family="OpenSans-Regular, Open Sans" font-size="14" font-weight="normal"><tspan x="57" y="166">Other</tspan></text><path id="Rectangle-356-Copy" fill="#FFF" d="M387 152h60v20h-60z"/><text id="ECMAScript" fill="#8A704D" font-family="OpenSans-Regular, Open Sans" font-size="14" font-weight="normal"><tspan x="383" y="165">ECMAScript</tspan></text></g></g></svg> <svg xmlns="http://www.w3.org/2000/svg" width="500" height="264" viewBox="0 0 500 264"><defs><style>@import url(https://fonts.googleapis.com/css?family=Open+Sans:bold,italic,bolditalic%7CPT+Mono);@font-face{font-family:&apos;PT Mono&apos;;font-weight:700;font-style:normal;src:local(&apos;PT MonoBold&apos;),url(/font/PTMonoBold.woff2) format(&apos;woff2&apos;),url(/font/PTMonoBold.woff) format(&apos;woff&apos;),url(/font/PTMonoBold.ttf) format(&apos;truetype&apos;)}</style></defs><g id="combined" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="ifelse_task2.svg"><path id="Path-1218-Copy" fill="#C06334" fill-rule="nonzero" d="M425.5 133.5v54h8l-9.5 19-9.5-19h8v-51h-82v-3h85z"/><g id="Rectangle-1-+-Корень" transform="translate(213 4)"><rect id="Rectangle-1" width="78" height="28" x="1" y="1" fill="#FBF2EC" stroke="#DBAF88" stroke-width="2" rx="14"/><text id="Begin" fill="#AF6E24" font-family="OpenSans-Regular, Open Sans" font-size="14" font-weight="normal"><tspan x="21" y="19">Begin</tspan></text></g><g id="Rectangle-1-+-Корень-Copy-2" transform="translate(8 206)"><rect id="Rectangle-1" width="131" height="49" x="1" y="1" fill="#FBF2EC" stroke="#DBAF88" stroke-width="2" rx="24.5"/><text id="You-don't-know?-“ECM" fill="#AF6E24" font-family="OpenSans-Regular, Open Sans" font-size="14" font-weight="normal"><tspan x="12.937" y="20">You don&apos;t know?</tspan> <tspan x="22.107" y="39">“ECMAScript”!</tspan></text></g><g id="Rectangle-1-+-Корень-Copy-3" transform="translate(354 206)"><rect id="Rectangle-1" width="131" height="49" x="1" y="1" fill="#FBF2EC" stroke="#DBAF88" stroke-width="2" rx="24.5"/><text id="Right!" fill="#AF6E24" font-family="OpenSans-Regular, Open Sans" font-size="14" font-weight="normal"><tspan x="47.93" y="28">Right!</tspan></text></g><path id="Line" fill="#C06334" fill-rule="nonzero" d="M255 34v23.049l8 .001-9.5 19-9.5-19 8-.001V34h3z"/><path id="Path-1218" fill="#C06334" fill-rule="nonzero" d="M139.5 133.5v3h-59v51h8l-9.5 19-9.5-19h8v-54h62z"/><path id="Rectangle-356" fill="#FFF" d="M47 152h60v20H47z"/><g id="Rectangle-354-+-Каково-“официальное”" transform="translate(137 76)"><path id="Rectangle-354" fill="#FBF2EC" stroke="#DBAF88" stroke-width="2" d="M116.5 1.123L230.801 59.5 116.5 117.877 2.199 59.5 116.5 1.123z"/><text id="What's-the-“official" fill="#AF6E24" font-family="OpenSans-Regular, Open Sans" font-size="14" font-weight="normal"><tspan x="80.958" y="43">What&apos;s the</tspan> <tspan x="60.214" y="62">“official” name of</tspan> <tspan x="80.77" y="81">JavaScript?</tspan></text></g><text id="Other" fill="#AF6E24" font-family="OpenSans-Regular, Open Sans" font-size="14" font-weight="normal"><tspan x="57" y="166">Other</tspan></text><path id="Rectangle-356-Copy" fill="#FFF" d="M387 152h60v20h-60z"/><text id="ECMAScript" fill="#AF6E24" font-family="OpenSans-Regular, Open Sans" font-size="14" font-weight="normal"><tspan x="383" y="165">ECMAScript</tspan></text></g></g></svg>

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before After
Before After

View file

@ -6,7 +6,7 @@ importance: 2
Using the `if..else` construct, write the code which asks: 'What is the "official" name of JavaScript?' Using the `if..else` construct, write the code which asks: 'What is the "official" name of JavaScript?'
If the visitor enters "ECMAScript", then output "Right!", otherwise -- output: "Didn't know? ECMAScript!" If the visitor enters "ECMAScript", then output "Right!", otherwise -- output: "You don't know? ECMAScript!"
![](ifelse_task2.svg) ![](ifelse_task2.svg)

View file

@ -1,4 +1,4 @@
# Conditional operators: if, '?' # Conditional branching: if, '?'
Sometimes, we need to perform different actions based on different conditions. Sometimes, we need to perform different actions based on different conditions.
@ -68,7 +68,7 @@ if (cond) {
## The "else" clause ## The "else" clause
The `if` statement may contain an optional "else" block. It executes when the condition is false. The `if` statement may contain an optional "else" block. It executes when the condition is falsy.
For example: For example:
```js run ```js run

View file

@ -6,7 +6,7 @@ alert( alert(1) || 2 || alert(3) );
The call to `alert` does not return a value. Or, in other words, it returns `undefined`. The call to `alert` does not return a value. Or, in other words, it returns `undefined`.
1. The first OR `||` evaluates it's left operand `alert(1)`. That shows the first message with `1`. 1. The first OR `||` evaluates its left operand `alert(1)`. That shows the first message with `1`.
2. The `alert` returns `undefined`, so OR goes on to the second operand searching for a truthy value. 2. The `alert` returns `undefined`, so OR goes on to the second operand searching for a truthy value.
3. The second operand `2` is truthy, so the execution is halted, `2` is returned and then shown by the outer alert. 3. The second operand `2` is truthy, so the execution is halted, `2` is returned and then shown by the outer alert.

View file

@ -1,6 +1,6 @@
The answer: `null`, because it's the first falsy value from the list. The answer: `null`, because it's the first falsy value from the list.
```js run ```js run
alert( 1 && null && 2 ); alert(1 && null && 2);
``` ```

View file

@ -4,6 +4,6 @@ importance: 3
# Check the range between # Check the range between
Write an "if" condition to check that `age` is between `14` and `90` inclusively. Write an `if` condition to check that `age` is between `14` and `90` inclusively.
"Inclusively" means that `age` can reach the edges `14` or `90`. "Inclusively" means that `age` can reach the edges `14` or `90`.

View file

@ -4,6 +4,6 @@ importance: 3
# Check the range outside # Check the range outside
Write an `if` condition to check that `age` is NOT between 14 and 90 inclusively. Write an `if` condition to check that `age` is NOT between `14` and `90` inclusively.
Create two variants: the first one using NOT `!`, the second one -- without it. Create two variants: the first one using NOT `!`, the second one -- without it.

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 6 KiB

After

Width:  |  Height:  |  Size: 6 KiB

Before After
Before After

View file

@ -3,19 +3,19 @@
```js run demo ```js run demo
let userName = prompt("Who's there?", ''); let userName = prompt("Who's there?", '');
if (userName == 'Admin') { if (userName === 'Admin') {
let pass = prompt('Password?', ''); let pass = prompt('Password?', '');
if (pass == 'TheMaster') { if (pass === 'TheMaster') {
alert( 'Welcome!' ); alert( 'Welcome!' );
} else if (pass == '' || pass == null) { } else if (pass === '' || pass === null) {
alert( 'Canceled' ); alert( 'Canceled' );
} else { } else {
alert( 'Wrong password' ); alert( 'Wrong password' );
} }
} else if (userName == '' || userName == null) { } else if (userName === '' || userName === null) {
alert( 'Canceled' ); alert( 'Canceled' );
} else { } else {
alert( "I don't know you" ); alert( "I don't know you" );

View file

@ -1,6 +1,6 @@
# Logical operators # Logical operators
There are three logical operators in JavaScript: `||` (OR), `&&` (AND), `!` (NOT). There are four logical operators in JavaScript: `||` (OR), `&&` (AND), `!` (NOT), `??` (Nullish Coalescing). Here we cover the first three, the `??` operator is in the next article.
Although they are called "logical", they can be applied to values of any type, not only boolean. Their result can also be of any type. Although they are called "logical", they can be applied to values of any type, not only boolean. Their result can also be of any type.
@ -64,7 +64,7 @@ if (hour < 10 || hour > 18 || isWeekend) {
} }
``` ```
## OR "||" finds the first truthy value ## OR "||" finds the first truthy value [#or-finds-the-first-truthy-value]
The logic described above is somewhat classical. Now, let's bring in the "extra" features of JavaScript. The logic described above is somewhat classical. Now, let's bring in the "extra" features of JavaScript.
@ -84,16 +84,16 @@ The OR `||` operator does the following:
A value is returned in its original form, without the conversion. A value is returned in its original form, without the conversion.
In other words, a chain of OR `"||"` returns the first truthy value or the last one if no truthy value is found. In other words, a chain of OR `||` returns the first truthy value or the last one if no truthy value is found.
For instance: For instance:
```js run ```js run
alert( 1 || 0 ); // 1 (1 is truthy) alert( 1 || 0 ); // 1 (1 is truthy)
alert( true || 'no matter what' ); // (true is truthy)
alert( null || 1 ); // 1 (1 is the first truthy value) alert( null || 1 ); // 1 (1 is the first truthy value)
alert( null || 0 || 1 ); // 1 (the first truthy value) alert( null || 0 || 1 ); // 1 (the first truthy value)
alert( undefined || null || 0 ); // 0 (all falsy, returns the last value) alert( undefined || null || 0 ); // 0 (all falsy, returns the last value)
``` ```
@ -101,53 +101,40 @@ This leads to some interesting usage compared to a "pure, classical, boolean-onl
1. **Getting the first truthy value from a list of variables or expressions.** 1. **Getting the first truthy value from a list of variables or expressions.**
Imagine we have a list of variables which can either contain data or be `null/undefined`. How can we find the first one with data? For instance, we have `firstName`, `lastName` and `nickName` variables, all optional (i.e. can be undefined or have falsy values).
We can use OR `||`: Let's use OR `||` to choose the one that has the data and show it (or `"Anonymous"` if nothing set):
```js run ```js run
let currentUser = null; let firstName = "";
let defaultUser = "John"; let lastName = "";
let nickName = "SuperCoder";
*!* *!*
let name = currentUser || defaultUser || "unnamed"; alert( firstName || lastName || nickName || "Anonymous"); // SuperCoder
*/!* */!*
alert( name ); // selects "John" the first truthy value
``` ```
If both `currentUser` and `defaultUser` were falsy, `"unnamed"` would be the result. If all variables were falsy, `"Anonymous"` would show up.
2. **Short-circuit evaluation.** 2. **Short-circuit evaluation.**
Operands can be not only values, but arbitrary expressions. OR evaluates and tests them from left to right. The evaluation stops when a truthy value is reached, and the value is returned. This process is called "a short-circuit evaluation" because it goes as short as possible from left to right. Another feature of OR `||` operator is the so-called "short-circuit" evaluation.
This is clearly seen when the expression given as the second argument has a side effect like a variable assignment. It means that `||` processes its arguments until the first truthy value is reached, and then the value is returned immediately, without even touching the other argument.
In the example below, `x` does not get assigned: The importance of this feature becomes obvious if an operand isn't just a value, but an expression with a side effect, such as a variable assignment or a function call.
In the example below, only the second message is printed:
```js run no-beautify ```js run no-beautify
let x; *!*true*/!* || alert("not printed");
*!*false*/!* || alert("printed");
*!*true*/!* || (x = 1);
alert(x); // undefined, because (x = 1) not evaluated
``` ```
If, instead, the first argument is `false`, `||` evaluates the second one, thus running the assignment: In the first line, the OR `||` operator stops the evaluation immediately upon seeing `true`, so the `alert` isn't run.
```js run no-beautify Sometimes, people use this feature to execute commands only if the condition on the left part is falsy.
let x;
*!*false*/!* || (x = 1);
alert(x); // 1
```
An assignment is a simple case. There may be side effects, that won't show up if the evaluation doesn't reach them.
As we can see, such a use case is a "shorter way of doing `if`". The first operand is converted to boolean. If it's false, the second one is evaluated.
Most of time, it's better to use a "regular" `if` to keep the code easy to understand, but sometimes this can be handy.
## && (AND) ## && (AND)
@ -236,7 +223,8 @@ The precedence of AND `&&` operator is higher than OR `||`.
So the code `a && b || c && d` is essentially the same as if the `&&` expressions were in parentheses: `(a && b) || (c && d)`. So the code `a && b || c && d` is essentially the same as if the `&&` expressions were in parentheses: `(a && b) || (c && d)`.
```` ````
Just like OR, the AND `&&` operator can sometimes replace `if`. ````warn header="Don't replace `if` with `||` or `&&`"
Sometimes, people use the AND `&&` operator as a "shorter way to write `if`".
For instance: For instance:
@ -253,14 +241,12 @@ So we basically have an analogue for:
```js run ```js run
let x = 1; let x = 1;
if (x > 0) { if (x > 0) alert( 'Greater than zero!' );
alert( 'Greater than zero!' );
}
``` ```
The variant with `&&` appears shorter. But `if` is more obvious and tends to be a little bit more readable. Although, the variant with `&&` appears shorter, `if` is more obvious and tends to be a little bit more readable. So we recommend using every construct for its purpose: use `if` if we want `if` and use `&&` if we want AND.
````
So we recommend using every construct for its purpose: use `if` if we want if and use `&&` if we want AND.
## ! (NOT) ## ! (NOT)

View file

@ -0,0 +1,169 @@
# Nullish coalescing operator '??'
[recent browser="new"]
The nullish coalescing operator is written as two question marks `??`.
As it treats `null` and `undefined` similarly, we'll use a special term here, in this article. For brevity, we'll say that a value is "defined" when it's neither `null` nor `undefined`.
The result of `a ?? b` is:
- if `a` is defined, then `a`,
- if `a` isn't defined, then `b`.
In other words, `??` returns the first argument if it's not `null/undefined`. Otherwise, the second one.
The nullish coalescing operator isn't anything completely new. It's just a nice syntax to get the first "defined" value of the two.
We can rewrite `result = a ?? b` using the operators that we already know, like this:
```js
result = (a !== null && a !== undefined) ? a : b;
```
Now it should be absolutely clear what `??` does. Let's see where it helps.
The common use case for `??` is to provide a default value.
For example, here we show `user` if its value isn't `null/undefined`, otherwise `Anonymous`:
```js run
let user;
alert(user ?? "Anonymous"); // Anonymous (user not defined)
```
Here's the example with `user` assigned to a name:
```js run
let user = "John";
alert(user ?? "Anonymous"); // John (user defined)
```
We can also use a sequence of `??` to select the first value from a list that isn't `null/undefined`.
Let's say we have a user's data in variables `firstName`, `lastName` or `nickName`. All of them may be not defined, if the user decided not to fill in the corresponding values.
We'd like to display the user name using one of these variables, or show "Anonymous" if all of them are `null/undefined`.
Let's use the `??` operator for that:
```js run
let firstName = null;
let lastName = null;
let nickName = "Supercoder";
// shows the first defined value:
*!*
alert(firstName ?? lastName ?? nickName ?? "Anonymous"); // Supercoder
*/!*
```
## Comparison with ||
The OR `||` operator can be used in the same way as `??`, as it was described in the [previous chapter](info:logical-operators#or-finds-the-first-truthy-value).
For example, in the code above we could replace `??` with `||` and still get the same result:
```js run
let firstName = null;
let lastName = null;
let nickName = "Supercoder";
// shows the first truthy value:
*!*
alert(firstName || lastName || nickName || "Anonymous"); // Supercoder
*/!*
```
Historically, the OR `||` operator was there first. It exists since the beginning of JavaScript, so developers were using it for such purposes for a long time.
On the other hand, the nullish coalescing operator `??` was added to JavaScript only recently, and the reason for that was that people weren't quite happy with `||`.
The important difference between them is that:
- `||` returns the first *truthy* value.
- `??` returns the first *defined* value.
In other words, `||` doesn't distinguish between `false`, `0`, an empty string `""` and `null/undefined`. They are all the same -- falsy values. If any of these is the first argument of `||`, then we'll get the second argument as the result.
In practice though, we may want to use default value only when the variable is `null/undefined`. That is, when the value is really unknown/not set.
For example, consider this:
```js run
let height = 0;
alert(height || 100); // 100
alert(height ?? 100); // 0
```
- The `height || 100` checks `height` for being a falsy value, and it's `0`, falsy indeed.
- so the result of `||` is the second argument, `100`.
- The `height ?? 100` checks `height` for being `null/undefined`, and it's not,
- so the result is `height` "as is", that is `0`.
In practice, the zero height is often a valid value, that shouldn't be replaced with the default. So `??` does just the right thing.
## Precedence
The precedence of the `??` operator is the same as `||`. They both equal `3` in the [MDN table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#Table).
That means that, just like `||`, the nullish coalescing operator `??` is evaluated before `=` and `?`, but after most other operations, such as `+`, `*`.
So we may need to add parentheses in expressions like this:
```js run
let height = null;
let width = null;
// important: use parentheses
let area = (height ?? 100) * (width ?? 50);
alert(area); // 5000
```
Otherwise, if we omit parentheses, then as `*` has the higher precedence than `??`, it would execute first, leading to incorrect results.
```js
// without parentheses
let area = height ?? 100 * width ?? 50;
// ...works this way (not what we want):
let area = height ?? (100 * width) ?? 50;
```
### Using ?? with && or ||
Due to safety reasons, JavaScript forbids using `??` together with `&&` and `||` operators, unless the precedence is explicitly specified with parentheses.
The code below triggers a syntax error:
```js run
let x = 1 && 2 ?? 3; // Syntax error
```
The limitation is surely debatable, it was added to the language specification with the purpose to avoid programming mistakes, when people start to switch from `||` to `??`.
Use explicit parentheses to work around it:
```js run
*!*
let x = (1 && 2) ?? 3; // Works
*/!*
alert(x); // 2
```
## Summary
- The nullish coalescing operator `??` provides a short way to choose the first "defined" value from a list.
It's used to assign default values to variables:
```js
// set height=100, if height is null or undefined
height = height ?? 100;
```
- The operator `??` has a very low precedence, only a bit higher than `?` and `=`, so consider adding parentheses when using it in an expression.
- It's forbidden to use it with `||` or `&&` without explicit parentheses.

View file

@ -10,6 +10,6 @@ do {
The loop `do..while` repeats while both checks are truthy: The loop `do..while` repeats while both checks are truthy:
1. The check for `num <= 100` -- that is, the entered value is still not greater than `100`. 1. The check for `num <= 100` -- that is, the entered value is still not greater than `100`.
2. The check `&& num` is false when `num` is `null` or a empty string. Then the `while` loop stops too. 2. The check `&& num` is false when `num` is `null` or an empty string. Then the `while` loop stops too.
P.S. If `num` is `null` then `num <= 100` is `true`, so without the 2nd check the loop wouldn't stop if the user clicks CANCEL. Both checks are required. P.S. If `num` is `null` then `num <= 100` is `true`, so without the 2nd check the loop wouldn't stop if the user clicks CANCEL. Both checks are required.

View file

@ -6,6 +6,19 @@ For example, outputting goods from a list one after another or just running the
*Loops* are a way to repeat the same code multiple times. *Loops* are a way to repeat the same code multiple times.
```smart header="The for..of and for..in loops"
A small announcement for advanced readers.
This article covers only basic loops: `while`, `do..while` and `for(..;..;..)`.
If you came to this article searching for other types of loops, here are the pointers:
- See [for..in](info:object#forin) to loop over object properties.
- See [for..of](info:array#loops) and [iterables](info:iterable) for looping over arrays and iterable objects.
Otherwise, please read on.
```
## The "while" loop ## The "while" loop
The `while` loop has the following syntax: The `while` loop has the following syntax:
@ -106,7 +119,7 @@ Let's examine the `for` statement part-by-part:
| part | | | | part | | |
|-------|----------|----------------------------------------------------------------------------| |-------|----------|----------------------------------------------------------------------------|
| begin | `i = 0` | Executes once upon entering the loop. | | begin | `let i = 0` | Executes once upon entering the loop. |
| condition | `i < 3`| Checked before every loop iteration. If false, the loop stops. | | condition | `i < 3`| Checked before every loop iteration. If false, the loop stops. |
| body | `alert(i)`| Runs again and again while the condition is truthy. | | body | `alert(i)`| Runs again and again while the condition is truthy. |
| step| `i++` | Executes after the body on each iteration. | | step| `i++` | Executes after the body on each iteration. |
@ -162,10 +175,8 @@ for (i = 0; i < 3; i++) { // use an existing variable
alert(i); // 3, visible, because declared outside of the loop alert(i); // 3, visible, because declared outside of the loop
``` ```
```` ````
### Skipping parts ### Skipping parts
Any part of `for` can be skipped. Any part of `for` can be skipped.
@ -268,7 +279,7 @@ for (let i = 0; i < 10; i++) {
From a technical point of view, this is identical to the example above. Surely, we can just wrap the code in an `if` block instead of using `continue`. From a technical point of view, this is identical to the example above. Surely, we can just wrap the code in an `if` block instead of using `continue`.
But as a side-effect, this created one more level of nesting (the `alert` call inside the curly braces). If the code inside of `if` is longer than a few lines, that may decrease the overall readability. But as a side effect, this created one more level of nesting (the `alert` call inside the curly braces). If the code inside of `if` is longer than a few lines, that may decrease the overall readability.
```` ````
````warn header="No `break/continue` to the right side of '?'" ````warn header="No `break/continue` to the right side of '?'"
@ -286,7 +297,6 @@ if (i > 5) {
...and rewrite it using a question mark: ...and rewrite it using a question mark:
```js no-beautify ```js no-beautify
(i > 5) ? alert(i) : *!*continue*/!*; // continue isn't allowed here (i > 5) ? alert(i) : *!*continue*/!*; // continue isn't allowed here
``` ```
@ -318,9 +328,10 @@ alert('Done!');
We need a way to stop the process if the user cancels the input. We need a way to stop the process if the user cancels the input.
The ordinary `break` after `input` would only break the inner loop. That's not sufficient--labels, come to the rescue! The ordinary `break` after `input` would only break the inner loop. That's not sufficient -- labels, come to the rescue!
A *label* is an identifier with a colon before a loop: A *label* is an identifier with a colon before a loop:
```js ```js
labelName: for (...) { labelName: for (...) {
... ...
@ -342,6 +353,7 @@ The `break <labelName>` statement in the loop below breaks out to the label:
// do something with the value... // do something with the value...
} }
} }
alert('Done!'); alert('Done!');
``` ```
@ -362,13 +374,26 @@ The `continue` directive can also be used with a label. In this case, code execu
Labels do not allow us to jump into an arbitrary place in the code. Labels do not allow us to jump into an arbitrary place in the code.
For example, it is impossible to do this: For example, it is impossible to do this:
```js ```js
break label; // doesn't jumps to the label below break label; // jump to the label below (doesn't work)
label: for (...) label: for (...)
``` ```
A call to `break/continue` is only possible from inside a loop and the label must be somewhere above the directive. A `break` directive must be inside a code block. Technically, any labelled code block will do, e.g.:
```js
label: {
// ...
break label; // works
// ...
}
```
...Although, 99.9% of the time `break` is used inside loops, as we've seen in the examples above.
A `continue` is only possible from inside a loop.
```` ````
## Summary ## Summary

View file

@ -47,7 +47,7 @@ switch (a) {
break; break;
*/!* */!*
case 5: case 5:
alert( 'Too large' ); alert( 'Too big' );
break; break;
default: default:
alert( "I don't know such values" ); alert( "I don't know such values" );
@ -117,7 +117,7 @@ Several variants of `case` which share the same code can be grouped.
For example, if we want the same code to run for `case 3` and `case 5`: For example, if we want the same code to run for `case 3` and `case 5`:
```js run no-beautify ```js run no-beautify
let a = 2 + 2; let a = 3;
switch (a) { switch (a) {
case 4: case 4:
@ -139,7 +139,7 @@ switch (a) {
Now both `3` and `5` show the same message. Now both `3` and `5` show the same message.
The ability to "group" cases is a side-effect of how `switch/case` works without `break`. Here the execution of `case 3` starts from the line `(*)` and goes through `case 5`, because there's no `break`. The ability to "group" cases is a side effect of how `switch/case` works without `break`. Here the execution of `case 3` starts from the line `(*)` and goes through `case 5`, because there's no `break`.
## Type matters ## Type matters

View file

@ -0,0 +1,3 @@
No difference!
In both cases, `return confirm('Did parents allow you?')` executes exactly when the `if` condition is falsy.

View file

@ -14,4 +14,4 @@ function checkAge(age) {
} }
``` ```
Note that the parentheses around `age > 18` are not required here. They exist for better readabilty. Note that the parentheses around `age > 18` are not required here. They exist for better readability.

View file

@ -20,11 +20,11 @@ function showMessage() {
} }
``` ```
The `function` keyword goes first, then goes the *name of the function*, then a list of *parameters* between the parentheses (comma-separated, empty in the example above) and finally the code of the function, also named "the function body", between curly braces. The `function` keyword goes first, then goes the *name of the function*, then a list of *parameters* between the parentheses (comma-separated, empty in the example above, we'll see examples later) and finally the code of the function, also named "the function body", between curly braces.
```js ```js
function name(parameters) { function name(parameter1, parameter2, ... parameterN) {
...body... // body
} }
``` ```
@ -137,26 +137,23 @@ It's a good practice to minimize the use of global variables. Modern code has fe
## Parameters ## Parameters
We can pass arbitrary data to functions using parameters (also called *function arguments*) . We can pass arbitrary data to functions using parameters.
In the example below, the function has two parameters: `from` and `text`. In the example below, the function has two parameters: `from` and `text`.
```js run ```js run
function showMessage(*!*from, text*/!*) { // arguments: from, text function showMessage(*!*from, text*/!*) { // parameters: from, text
alert(from + ': ' + text); alert(from + ': ' + text);
} }
*!* *!*showMessage('Ann', 'Hello!');*/!* // Ann: Hello! (*)
showMessage('Ann', 'Hello!'); // Ann: Hello! (*) *!*showMessage('Ann', "What's up?");*/!* // Ann: What's up? (**)
showMessage('Ann', "What's up?"); // Ann: What's up? (**)
*/!*
``` ```
When the function is called in lines `(*)` and `(**)`, the given values are copied to local variables `from` and `text`. Then the function uses them. When the function is called in lines `(*)` and `(**)`, the given values are copied to local variables `from` and `text`. Then the function uses them.
Here's one more example: we have a variable `from` and pass it to the function. Please note: the function changes `from`, but the change is not seen outside, because a function always gets a copy of the value: Here's one more example: we have a variable `from` and pass it to the function. Please note: the function changes `from`, but the change is not seen outside, because a function always gets a copy of the value:
```js run ```js run
function showMessage(from, text) { function showMessage(from, text) {
@ -175,9 +172,21 @@ showMessage(from, "Hello"); // *Ann*: Hello
alert( from ); // Ann alert( from ); // Ann
``` ```
When a value is passed as a function parameter, it's also called an *argument*.
In other words, to put these terms straight:
- A parameter is the variable listed inside the parentheses in the function declaration (it's a declaration time term).
- An argument is the value that is passed to the function when it is called (it's a call time term).
We declare functions listing their parameters, then call them passing arguments.
In the example above, one might say: "the function `showMessage` is declared with two parameters, then called with two arguments: `from` and `"Hello"`".
## Default values ## Default values
If a parameter is not provided, then its value becomes `undefined`. If a function is called, but an argument is not provided, then the corresponding value becomes `undefined`.
For instance, the aforementioned function `showMessage(from, text)` can be called with a single argument: For instance, the aforementioned function `showMessage(from, text)` can be called with a single argument:
@ -185,9 +194,9 @@ For instance, the aforementioned function `showMessage(from, text)` can be calle
showMessage("Ann"); showMessage("Ann");
``` ```
That's not an error. Such a call would output `"Ann: undefined"`. There's no `text`, so it's assumed that `text === undefined`. That's not an error. Such a call would output `"*Ann*: undefined"`. As the value for `text` isn't passed, it becomes `undefined`.
If we want to use a "default" `text` in this case, then we can specify it after `=`: We can specify the so-called "default" (to use if omitted) value for a parameter in the function declaration, using `=`:
```js run ```js run
function showMessage(from, *!*text = "no text given"*/!*) { function showMessage(from, *!*text = "no text given"*/!*) {
@ -197,7 +206,13 @@ function showMessage(from, *!*text = "no text given"*/!*) {
showMessage("Ann"); // Ann: no text given showMessage("Ann"); // Ann: no text given
``` ```
Now if the `text` parameter is not passed, it will get the value `"no text given"` Now if the `text` parameter is not passed, it will get the value `"no text given"`.
The default value also jumps in if the parameter exists, but strictly equals `undefined`, like this:
```js
showMessage("Ann", undefined); // Ann: no text given
```
Here `"no text given"` is a string, but it can be a more complex expression, which is only evaluated and assigned if the parameter is missing. So, this is also possible: Here `"no text given"` is a string, but it can be a more complex expression, which is only evaluated and assigned if the parameter is missing. So, this is also possible:
@ -211,13 +226,17 @@ function showMessage(from, text = anotherFunction()) {
```smart header="Evaluation of default parameters" ```smart header="Evaluation of default parameters"
In JavaScript, a default parameter is evaluated every time the function is called without the respective parameter. In JavaScript, a default parameter is evaluated every time the function is called without the respective parameter.
In the example above, `anotherFunction()` is called every time `showMessage()` is called without the `text` parameter. In the example above, `anotherFunction()` isn't called at all, if the `text` parameter is provided.
On the other hand, it's independently called every time when `text` is missing.
``` ```
````smart header="Default parameters old-style" ````smart header="Default parameters in old JavaScript code"
Old editions of JavaScript did not support default parameters. So there are alternative ways to support them, that you can find mostly in the old scripts. Several years ago, JavaScript didn't support the syntax for default parameters. So people used other ways to specify them.
For instance, an explicit check for being `undefined`: Nowadays, we can come across them in old scripts.
For example, an explicit check for `undefined`:
```js ```js
function showMessage(from, text) { function showMessage(from, text) {
@ -231,20 +250,64 @@ function showMessage(from, text) {
} }
``` ```
...Or the `||` operator: ...Or using the `||` operator:
```js ```js
function showMessage(from, text) { function showMessage(from, text) {
// if text is falsy then text gets the "default" value // If the value of text is falsy, assign the default value
// this assumes that text == "" is the same as no text at all
text = text || 'no text given'; text = text || 'no text given';
... ...
} }
``` ```
```` ````
### Alternative default parameters
Sometimes it makes sense to assign default values for parameters at a later stage after the function declaration.
We can check if the parameter is passed during the function execution, by comparing it with `undefined`:
```js run
function showMessage(text) {
// ...
*!*
if (text === undefined) { // if the parameter is missing
text = 'empty message';
}
*/!*
alert(text);
}
showMessage(); // empty message
```
...Or we could use the `||` operator:
```js
function showMessage(text) {
// if text is undefined or otherwise falsy, set it to 'empty'
text = text || 'empty';
...
}
```
Modern JavaScript engines support the [nullish coalescing operator](info:nullish-coalescing-operator) `??`, it's better when most falsy values, such as `0`, should be considered "normal":
```js run
function showCount(count) {
// if count is undefined or null, show "unknown"
alert(count ?? "unknown");
}
showCount(0); // 0
showCount(null); // unknown
showCount(); // unknown
```
## Returning a value ## Returning a value
A function can return a value back into the calling code as the result. A function can return a value back into the calling code as the result.
@ -399,7 +462,7 @@ Functions that are used *very often* sometimes have ultrashort names.
For example, the [jQuery](http://jquery.com) framework defines a function with `$`. The [Lodash](http://lodash.com/) library has its core function named `_`. For example, the [jQuery](http://jquery.com) framework defines a function with `$`. The [Lodash](http://lodash.com/) library has its core function named `_`.
These are exceptions. Generally functions names should be concise and descriptive. These are exceptions. Generally function names should be concise and descriptive.
``` ```
## Functions == Comments ## Functions == Comments
@ -465,7 +528,7 @@ function name(parameters, delimited, by, comma) {
To make the code clean and easy to understand, it's recommended to use mainly local variables and parameters in the function, not outer variables. To make the code clean and easy to understand, it's recommended to use mainly local variables and parameters in the function, not outer variables.
It is always easier to understand a function which gets parameters, works with them and returns a result than a function which gets no parameters, but modifies outer variables as a side-effect. It is always easier to understand a function which gets parameters, works with them and returns a result than a function which gets no parameters, but modifies outer variables as a side effect.
Function naming: Function naming:

View file

@ -12,7 +12,9 @@ function sayHi() {
There is another syntax for creating a function that is called a *Function Expression*. There is another syntax for creating a function that is called a *Function Expression*.
It looks like this: It allows us to create a new function in the middle of any expression.
For example:
```js ```js
let sayHi = function() { let sayHi = function() {
@ -20,9 +22,19 @@ let sayHi = function() {
}; };
``` ```
Here, the function is created and assigned to the variable explicitly, like any other value. No matter how the function is defined, it's just a value stored in the variable `sayHi`. Here we can see a variable `sayHi` getting a value, the new function, created as `function() { alert("Hello"); }`.
The meaning of these code samples is the same: "create a function and put it into the variable `sayHi`". As the function creation happens in the context of the assignment expression (to the right side of `=`), this is a *Function Expression*.
Please note, there's no name after the `function` keyword. Omitting a name is allowed for Function Expressions.
Here we immediately assign it to the variable, so the meaning of these code samples is the same: "create a function and put it into the variable `sayHi`".
In more advanced situations, that we'll come across later, a function may be created and immediately called or scheduled for a later execution, not stored anywhere, thus remaining anonymous.
## Function is a value
Let's reiterate: no matter how the function is created, a function is a value. Both examples above store a function in the `sayHi` variable.
We can even print out that value using `alert`: We can even print out that value using `alert`:
@ -63,10 +75,10 @@ Here's what happens above in detail:
2. Line `(2)` copies it into the variable `func`. Please note again: there are no parentheses after `sayHi`. If there were, then `func = sayHi()` would write *the result of the call* `sayHi()` into `func`, not *the function* `sayHi` itself. 2. Line `(2)` copies it into the variable `func`. Please note again: there are no parentheses after `sayHi`. If there were, then `func = sayHi()` would write *the result of the call* `sayHi()` into `func`, not *the function* `sayHi` itself.
3. Now the function can be called as both `sayHi()` and `func()`. 3. Now the function can be called as both `sayHi()` and `func()`.
Note that we could also have used a Function Expression to declare `sayHi`, in the first line: We could also have used a Function Expression to declare `sayHi`, in the first line:
```js ```js
let sayHi = function() { let sayHi = function() { // (1) create
alert( "Hello" ); alert( "Hello" );
}; };
@ -78,7 +90,7 @@ Everything would work the same.
````smart header="Why is there a semicolon at the end?" ````smart header="Why is there a semicolon at the end?"
You might wonder, why does Function Expression have a semicolon `;` at the end, but Function Declaration does not: You might wonder, why do Function Expressions have a semicolon `;` at the end, but Function Declarations do not:
```js ```js
function sayHi() { function sayHi() {
@ -90,9 +102,9 @@ let sayHi = function() {
}*!*;*/!* }*!*;*/!*
``` ```
The answer is simple: The answer is simple: a Function Expression is created here as `function(…) {…}` inside the assignment statement: `let sayHi = …;`. The semicolon `;` is recommended at the end of the statement, it's not a part of the function syntax.
- There's no need for `;` at the end of code blocks and syntax structures that use them like `if { ... }`, `for { }`, `function f { }` etc.
- A Function Expression is used inside the statement: `let sayHi = ...;`, as a value. It's not a code block, but rather an assignment. The semicolon `;` is recommended at the end of statements, no matter what the value is. So the semicolon here is not related to the Function Expression itself, it just terminates the statement. The semicolon would be there for a simpler assignment, such as `let sayHi = 5;`, and it's also there for a function assignment.
```` ````
## Callback functions ## Callback functions
@ -132,13 +144,13 @@ function showCancel() {
ask("Do you agree?", showOk, showCancel); ask("Do you agree?", showOk, showCancel);
``` ```
In practice, such functions are quite useful. The major difference between a real-life `ask` and the example above is that real-life functions use more complex ways to interact with the user than a simple `confirm`. In the browser, such function usually draws a nice-looking question window. But that's another story. In practice, such functions are quite useful. The major difference between a real-life `ask` and the example above is that real-life functions use more complex ways to interact with the user than a simple `confirm`. In the browser, such functions usually draw a nice-looking question window. But that's another story.
**The arguments `showOk` and `showCancel` of `ask` are called *callback functions* or just *callbacks*.** **The arguments `showOk` and `showCancel` of `ask` are called *callback functions* or just *callbacks*.**
The idea is that we pass a function and expect it to be "called back" later if necessary. In our case, `showOk` becomes the callback for "yes" answer, and `showCancel` for "no" answer. The idea is that we pass a function and expect it to be "called back" later if necessary. In our case, `showOk` becomes the callback for "yes" answer, and `showCancel` for "no" answer.
We can use Function Expressions to write the same function much shorter: We can use Function Expressions to write an equivalent, shorter function:
```js run no-beautify ```js run no-beautify
function ask(question, yes, no) { function ask(question, yes, no) {
@ -174,7 +186,7 @@ Let's formulate the key differences between Function Declarations and Expression
First, the syntax: how to differentiate between them in the code. First, the syntax: how to differentiate between them in the code.
- *Function Declaration:* a function, declared as a separate statement, in the main code flow. - *Function Declaration:* a function, declared as a separate statement, in the main code flow:
```js ```js
// Function Declaration // Function Declaration
@ -182,7 +194,7 @@ First, the syntax: how to differentiate between them in the code.
return a + b; return a + b;
} }
``` ```
- *Function Expression:* a function, created inside an expression or inside another syntax construct. Here, the function is created at the right side of the "assignment expression" `=`: - *Function Expression:* a function, created inside an expression or inside another syntax construct. Here, the function is created on the right side of the "assignment expression" `=`:
```js ```js
// Function Expression // Function Expression
@ -348,7 +360,7 @@ welcome(); // ok now
```smart header="When to choose Function Declaration versus Function Expression?" ```smart header="When to choose Function Declaration versus Function Expression?"
As a rule of thumb, when we need to declare a function, the first to consider is Function Declaration syntax. It gives more freedom in how to organize our code, because we can call such functions before they are declared. As a rule of thumb, when we need to declare a function, the first thing to consider is Function Declaration syntax. It gives more freedom in how to organize our code, because we can call such functions before they are declared.
That's also better for readability, as it's easier to look up `function f(…) {…}` in the code than `let f = function(…) {…};`. Function Declarations are more "eye-catching". That's also better for readability, as it's easier to look up `function f(…) {…}` in the code than `let f = function(…) {…};`. Function Declarations are more "eye-catching".

View file

@ -1,7 +1,7 @@
```js run ```js run
function ask(question, yes, no) { function ask(question, yes, no) {
if (confirm(question)) yes() if (confirm(question)) yes();
else no(); else no();
} }

View file

@ -5,7 +5,7 @@ Replace Function Expressions with arrow functions in the code below:
```js run ```js run
function ask(question, yes, no) { function ask(question, yes, no) {
if (confirm(question)) yes() if (confirm(question)) yes();
else no(); else no();
} }

View file

@ -5,15 +5,15 @@ There's another very simple and concise syntax for creating functions, that's of
It's called "arrow functions", because it looks like this: It's called "arrow functions", because it looks like this:
```js ```js
let func = (arg1, arg2, ...argN) => expression let func = (arg1, arg2, ..., argN) => expression;
``` ```
...This creates a function `func` that accepts arguments `arg1..argN`, then evaluates the `expression` on the right side with their use and returns its result. This creates a function `func` that accepts arguments `arg1..argN`, then evaluates the `expression` on the right side with their use and returns its result.
In other words, it's the shorter version of: In other words, it's the shorter version of:
```js ```js
let func = function(arg1, arg2, ...argN) { let func = function(arg1, arg2, ..., argN) {
return expression; return expression;
}; };
``` ```
@ -33,7 +33,7 @@ let sum = function(a, b) {
alert( sum(1, 2) ); // 3 alert( sum(1, 2) ); // 3
``` ```
As you can, see `(a, b) => a + b` means a function that accepts two arguments named `a` and `b`. Upon the execution, it evaluates the expression `a + b` and returns the result. As you can see, `(a, b) => a + b` means a function that accepts two arguments named `a` and `b`. Upon the execution, it evaluates the expression `a + b` and returns the result.
- If we have only one argument, then parentheses around parameters can be omitted, making that even shorter. - If we have only one argument, then parentheses around parameters can be omitted, making that even shorter.
@ -48,7 +48,7 @@ As you can, see `(a, b) => a + b` means a function that accepts two arguments na
alert( double(3) ); // 6 alert( double(3) ); // 6
``` ```
- If there are no arguments, parentheses will be empty (but they should be present): - If there are no arguments, parentheses are empty, but they must be present:
```js run ```js run
let sayHi = () => alert("Hello!"); let sayHi = () => alert("Hello!");
@ -64,10 +64,10 @@ For instance, to dynamically create a function:
let age = prompt("What is your age?", 18); let age = prompt("What is your age?", 18);
let welcome = (age < 18) ? let welcome = (age < 18) ?
() => alert('Hello') : () => alert('Hello!') :
() => alert("Greetings!"); () => alert("Greetings!");
welcome(); // ok now welcome();
``` ```
Arrow functions may appear unfamiliar and not very readable at first, but that quickly changes as the eyes get used to the structure. Arrow functions may appear unfamiliar and not very readable at first, but that quickly changes as the eyes get used to the structure.
@ -76,9 +76,9 @@ They are very convenient for simple one-line actions, when we're just too lazy t
## Multiline arrow functions ## Multiline arrow functions
The examples above took arguments from the left of `=>` and evaluated the right-side expression with them. The arrow functions that we've seen so far were very simple. They took arguments from the left of `=>`, evaluated and returned the right-side expression with them.
Sometimes we need something a little bit more complex, like multiple expressions or statements. It is also possible, but we should enclose them in curly braces. Then use a normal `return` within them. Sometimes we need a more complex function, with multiple expressions and statements. In that case, we can enclose them in curly braces. The major difference is that curly braces require a `return` within them to return a value (just like a regular function does).
Like this: Like this:
@ -105,7 +105,7 @@ For now, we can already use arrow functions for one-line actions and callbacks.
## Summary ## Summary
Arrow functions are handy for one-liners. They come in two flavors: Arrow functions are handy for simple actions, especially for one-liners. They come in two flavors:
1. Without curly braces: `(...args) => expression` -- the right side is an expression: the function evaluates it and returns the result. 1. Without curly braces: `(...args) => expression` -- the right side is an expression: the function evaluates it and returns the result. Parentheses can be omitted, if there's only a single argument, e.g. `n => n*2`.
2. With curly braces: `(...args) => { body }` -- brackets allow us to write multiple statements inside the function, but we need an explicit `return` to return something. 2. With curly braces: `(...args) => { body }` -- brackets allow us to write multiple statements inside the function, but we need an explicit `return` to return something.

View file

@ -55,7 +55,7 @@ To fully enable all features of modern JavaScript, we should start scripts with
The directive must be at the top of a script or at the beginning of a function body. The directive must be at the top of a script or at the beginning of a function body.
Without `"use strict"`, everything still works, but some features behave in the old-fashion, "compatible" way. We'd generally prefer the modern behavior. Without `"use strict"`, everything still works, but some features behave in the old-fashioned, "compatible" way. We'd generally prefer the modern behavior.
Some modern features of the language (like classes that we'll study in the future) enable strict mode implicitly. Some modern features of the language (like classes that we'll study in the future) enable strict mode implicitly.
@ -81,9 +81,10 @@ let x = 5;
x = "John"; x = "John";
``` ```
There are 7 data types: There are 8 data types:
- `number` for both floating-point and integer numbers, - `number` for both floating-point and integer numbers,
- `bigint` for integer numbers of arbitrary length,
- `string` for strings, - `string` for strings,
- `boolean` for logical values: `true/false`, - `boolean` for logical values: `true/false`,
- `null` -- a type with a single value `null`, meaning "empty" or "does not exist", - `null` -- a type with a single value `null`, meaning "empty" or "does not exist",
@ -143,7 +144,7 @@ Assignments
: There is a simple assignment: `a = b` and combined ones like `a *= 2`. : There is a simple assignment: `a = b` and combined ones like `a *= 2`.
Bitwise Bitwise
: Bitwise operators work with 32-bit integers at the lowest, bit-level: see the [docs](mdn:/JavaScript/Reference/Operators/Bitwise_Operators) when they are needed. : Bitwise operators work with 32-bit integers at the lowest, bit-level: see the [docs](mdn:/JavaScript/Guide/Expressions_and_Operators#bitwise_operators) when they are needed.
Conditional Conditional
: The only operator with three parameters: `cond ? resultA : resultB`. If `cond` is truthy, returns `resultA`, otherwise `resultB`. : The only operator with three parameters: `cond ? resultA : resultB`. If `cond` is truthy, returns `resultA`, otherwise `resultB`.
@ -151,6 +152,9 @@ Conditional
Logical operators Logical operators
: Logical AND `&&` and OR `||` perform short-circuit evaluation and then return the value where it stopped (not necessary `true`/`false`). Logical NOT `!` converts the operand to boolean type and returns the inverse value. : Logical AND `&&` and OR `||` perform short-circuit evaluation and then return the value where it stopped (not necessary `true`/`false`). Logical NOT `!` converts the operand to boolean type and returns the inverse value.
Nullish coalescing operator
: The `??` operator provides a way to choose a defined value from a list of variables. The result of `a ?? b` is `a` unless it's `null/undefined`, then `b`.
Comparisons Comparisons
: Equality check `==` for values of different types converts them to a number (except `null` and `undefined` that equal each other and nothing else), so these are equal: : Equality check `==` for values of different types converts them to a number (except `null` and `undefined` that equal each other and nothing else), so these are equal:
@ -170,7 +174,7 @@ Comparisons
Other operators Other operators
: There are few others, like a comma operator. : There are few others, like a comma operator.
More in: <info:operators>, <info:comparison>, <info:logical-operators>. More in: <info:operators>, <info:comparison>, <info:logical-operators>, <info:nullish-coalescing-operator>.
## Loops ## Loops
@ -212,6 +216,7 @@ let age = prompt('Your age?', 18);
switch (age) { switch (age) {
case 18: case 18:
alert("Won't work"); // the result of prompt is a string, not a number alert("Won't work"); // the result of prompt is a string, not a number
break;
case "18": case "18":
alert("This works!"); alert("This works!");
@ -251,7 +256,7 @@ We covered three ways to create a function in JavaScript:
3. Arrow functions: 3. Arrow functions:
```js ```js
// expression at the right side // expression on the right side
let sum = (a, b) => a + b; let sum = (a, b) => a + b;
// or multi-line syntax with { ... }, need return here: // or multi-line syntax with { ... }, need return here:
@ -268,7 +273,7 @@ We covered three ways to create a function in JavaScript:
``` ```
- Functions may have local variables: those declared inside its body. Such variables are only visible inside the function. - Functions may have local variables: those declared inside its body or its parameter list. Such variables are only visible inside the function.
- Parameters can have default values: `function sum(a = 1, b = 2) {...}`. - Parameters can have default values: `function sum(a = 1, b = 2) {...}`.
- Functions always return something. If there's no `return` statement, then the result is `undefined`. - Functions always return something. If there's no `return` statement, then the result is `undefined`.

View file

@ -1,4 +1,4 @@
# Debugging in Chrome # Debugging in the browser
Before writing more complex code, let's talk about debugging. Before writing more complex code, let's talk about debugging.
@ -38,7 +38,7 @@ If we press `key:Esc`, then a console opens below. We can type commands there an
After a statement is executed, its result is shown below. After a statement is executed, its result is shown below.
For example, here `1+2` results in `3`, and `hello("debugger")` returns nothing, so the result is `undefined`: For example, here `1+2` results in `3`, while the function call `hello("debugger")` returns nothing, so the result is `undefined`:
![](chrome-sources-console.svg) ![](chrome-sources-console.svg)
@ -63,12 +63,12 @@ We can always find a list of breakpoints in the right panel. That's useful when
- ...And so on. - ...And so on.
```smart header="Conditional breakpoints" ```smart header="Conditional breakpoints"
*Right click* on the line number allows to create a *conditional* breakpoint. It only triggers when the given expression is truthy. *Right click* on the line number allows to create a *conditional* breakpoint. It only triggers when the given expression, that you should provide when you create it, is truthy.
That's handy when we need to stop only for a certain variable value or for certain function parameters. That's handy when we need to stop only for a certain variable value or for certain function parameters.
``` ```
## Debugger command ## The command "debugger"
We can also pause the code by using the `debugger` command in it, like this: We can also pause the code by using the `debugger` command in it, like this:
@ -84,8 +84,7 @@ function hello(name) {
} }
``` ```
That's very convenient when we are in a code editor and don't want to switch to the browser and look up the script in developer tools to set the breakpoint. Such command works only when the development tools are open, otherwise the browser ignores it.
## Pause and look around ## Pause and look around
@ -99,7 +98,7 @@ Please open the informational dropdowns to the right (labeled with arrows). They
1. **`Watch` -- shows current values for any expressions.** 1. **`Watch` -- shows current values for any expressions.**
You can click the plus `+` and input an expression. The debugger will show its value at any moment, automatically recalculating it in the process of execution. You can click the plus `+` and input an expression. The debugger will show its value, automatically recalculating it in the process of execution.
2. **`Call Stack` -- shows the nested calls chain.** 2. **`Call Stack` -- shows the nested calls chain.**
@ -135,11 +134,11 @@ There are buttons for it at the top of the right panel. Let's engage them.
Clicking this again and again will step through all script statements one by one. Clicking this again and again will step through all script statements one by one.
<span class="devtools" style="background-position:-62px -192px"></span> -- "Step over": run the next command, but *don't go into a function*, hotkey `key:F10`. <span class="devtools" style="background-position:-62px -192px"></span> -- "Step over": run the next command, but *don't go into a function*, hotkey `key:F10`.
: Similar to the previous the "Step" command, but behaves differently if the next statement is a function call. That is: not a built-in, like `alert`, but a function of our own. : Similar to the previous "Step" command, but behaves differently if the next statement is a function call (not a built-in, like `alert`, but a function of our own).
The "Step" command goes into it and pauses the execution at its first line, while "Step over" executes the nested function call invisibly, skipping the function internals. If we compare them, the "Step" command goes into a nested function call and pauses the execution at its first line, while "Step over" executes the nested function call invisibly to us, skipping the function internals.
The execution is then paused immediately after that function. The execution is then paused immediately after that function call.
That's good if we're not interested to see what happens inside the function call. That's good if we're not interested to see what happens inside the function call.
@ -155,7 +154,7 @@ There are buttons for it at the top of the right panel. Let's engage them.
: That button does not move the execution. Just a mass on/off for breakpoints. : That button does not move the execution. Just a mass on/off for breakpoints.
<span class="devtools" style="background-position:-90px -146px"></span> -- enable/disable automatic pause in case of an error. <span class="devtools" style="background-position:-90px -146px"></span> -- enable/disable automatic pause in case of an error.
: When enabled, and the developer tools is open, a script error automatically pauses the execution. Then we can analyze variables to see what went wrong. So if our script dies with an error, we can open debugger, enable this option and reload the page to see where it dies and what's the context at that moment. : When enabled, if the developer tools is open, an error during the script execution automatically pauses it. Then we can analyze variables in the debugger to see what went wrong. So if our script dies with an error, we can open debugger, enable this option and reload the page to see where it dies and what's the context at that moment.
```smart header="Continue to here" ```smart header="Continue to here"
Right click on a line of code opens the context menu with a great option called "Continue to here". Right click on a line of code opens the context menu with a great option called "Continue to here".
@ -187,7 +186,7 @@ As we can see, there are three main ways to pause a script:
2. The `debugger` statements. 2. The `debugger` statements.
3. An error (if dev tools are open and the button <span class="devtools" style="background-position:-90px -146px"></span> is "on"). 3. An error (if dev tools are open and the button <span class="devtools" style="background-position:-90px -146px"></span> is "on").
When paused, we can debug - examine variables and trace the code to see where the execution goes wrong. When paused, we can debug: examine variables and trace the code to see where the execution goes wrong.
There are many more options in developer tools than covered here. The full manual is at <https://developers.google.com/web/tools/chrome-devtools>. There are many more options in developer tools than covered here. The full manual is at <https://developers.google.com/web/tools/chrome-devtools>.

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Before After
Before After

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 138 KiB

Before After
Before After

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Before After
Before After

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 170 KiB

Before After
Before After

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 164 KiB

Before After
Before After

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 161 KiB

Before After
Before After

View file

@ -12,7 +12,7 @@ function pow(x,n) // <- no space between arguments
let x=prompt("x?",''), n=prompt("n?",'') // <-- technically possible, let x=prompt("x?",''), n=prompt("n?",'') // <-- technically possible,
// but better make it 2 lines, also there's no spaces and missing ; // but better make it 2 lines, also there's no spaces and missing ;
if (n<0) // <- no spaces inside (n < 0), and should be extra line above it if (n<=0) // <- no spaces inside (n <= 0), and should be extra line above it
{ // <- figure bracket on a separate line { // <- figure bracket on a separate line
// below - long lines can be split into multiple lines for improved readability // below - long lines can be split into multiple lines for improved readability
alert(`Power ${n} is not supported, please enter an integer number greater than zero`); alert(`Power ${n} is not supported, please enter an integer number greater than zero`);
@ -39,7 +39,7 @@ function pow(x, n) {
let x = prompt("x?", ""); let x = prompt("x?", "");
let n = prompt("n?", ""); let n = prompt("n?", "");
if (n < 0) { if (n <= 0) {
alert(`Power ${n} is not supported, alert(`Power ${n} is not supported,
please enter an integer number greater than zero`); please enter an integer number greater than zero`);
} else { } else {

View file

@ -116,7 +116,7 @@ There are two types of indents:
One advantage of spaces over tabs is that spaces allow more flexible configurations of indents than the tab symbol. One advantage of spaces over tabs is that spaces allow more flexible configurations of indents than the tab symbol.
For instance, we can align the arguments with the opening bracket, like this: For instance, we can align the parameters with the opening bracket, like this:
```js no-beautify ```js no-beautify
show(parameters, show(parameters,
@ -285,7 +285,7 @@ Of course, a team can always write their own style guide, but usually there's no
Some popular choices: Some popular choices:
- [Google JavaScript Style Guide](https://google.github.io/styleguide/javascriptguide.xml) - [Google JavaScript Style Guide](https://google.github.io/styleguide/jsguide.html)
- [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript) - [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript)
- [Idiomatic.JS](https://github.com/rwaldron/idiomatic.js) - [Idiomatic.JS](https://github.com/rwaldron/idiomatic.js)
- [StandardJS](https://standardjs.com/) - [StandardJS](https://standardjs.com/)
@ -301,11 +301,11 @@ The great thing about them is that style-checking can also find some bugs, like
Here are some well-known linting tools: Here are some well-known linting tools:
- [JSLint](http://www.jslint.com/) -- one of the first linters. - [JSLint](https://www.jslint.com/) -- one of the first linters.
- [JSHint](http://www.jshint.com/) -- more settings than JSLint. - [JSHint](https://jshint.com/) -- more settings than JSLint.
- [ESLint](http://eslint.org/) -- probably the newest one. - [ESLint](https://eslint.org/) -- probably the newest one.
All of them can do the job. The author uses [ESLint](http://eslint.org/). All of them can do the job. The author uses [ESLint](https://eslint.org/).
Most linters are integrated with many popular editors: just enable the plugin in the editor and configure the style. Most linters are integrated with many popular editors: just enable the plugin in the editor and configure the style.
@ -328,14 +328,14 @@ Here's an example of an `.eslintrc` file:
}, },
"rules": { "rules": {
"no-console": 0, "no-console": 0,
"indent": ["warning", 2] "indent": 2
} }
} }
``` ```
Here the directive `"extends"` denotes that the configuration is based on the "eslint:recommended" set of settings. After that, we specify our own. Here the directive `"extends"` denotes that the configuration is based on the "eslint:recommended" set of settings. After that, we specify our own.
It is also possible to download style rule sets from the web and extend them instead. See <http://eslint.org/docs/user-guide/getting-started> for more details about installation. It is also possible to download style rule sets from the web and extend them instead. See <https://eslint.org/docs/user-guide/getting-started> for more details about installation.
Also certain IDEs have built-in linting, which is convenient but not as customizable as ESLint. Also certain IDEs have built-in linting, which is convenient but not as customizable as ESLint.

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 132 KiB

Before After
Before After

View file

@ -125,25 +125,25 @@ Describe the architecture
Document function parameters and usage Document function parameters and usage
: There's a special syntax [JSDoc](http://en.wikipedia.org/wiki/JSDoc) to document a function: usage, parameters, returned value. : There's a special syntax [JSDoc](http://en.wikipedia.org/wiki/JSDoc) to document a function: usage, parameters, returned value.
For instance: For instance:
```js ```js
/** /**
* Returns x raised to the n-th power. * Returns x raised to the n-th power.
* *
* @param {number} x The number to raise. * @param {number} x The number to raise.
* @param {number} n The power, must be a natural number. * @param {number} n The power, must be a natural number.
* @return {number} x raised to the n-th power. * @return {number} x raised to the n-th power.
*/ */
function pow(x, n) { function pow(x, n) {
... ...
} }
``` ```
Such comments allow us to understand the purpose of the function and use it the right way without looking in its code. Such comments allow us to understand the purpose of the function and use it the right way without looking in its code.
By the way, many editors like [WebStorm](https://www.jetbrains.com/webstorm/) can understand them as well and use them to provide autocomplete and some automatic code-checking. By the way, many editors like [WebStorm](https://www.jetbrains.com/webstorm/) can understand them as well and use them to provide autocomplete and some automatic code-checking.
Also, there are tools like [JSDoc 3](https://github.com/jsdoc3/jsdoc) that can generate HTML-documentation from the comments. You can read more information about JSDoc at <http://usejsdoc.org/>. Also, there are tools like [JSDoc 3](https://github.com/jsdoc/jsdoc) that can generate HTML-documentation from the comments. You can read more information about JSDoc at <https://jsdoc.app>.
Why is the task solved this way? Why is the task solved this way?
: What's written is important. But what's *not* written may be even more important to understand what's going on. Why is the task solved exactly this way? The code gives no answer. : What's written is important. But what's *not* written may be even more important to understand what's going on. Why is the task solved exactly this way? The code gives no answer.

View file

@ -1,7 +1,7 @@
# Ninja code # Ninja code
```quote author="Confucius" ```quote author="Confucius (Analects)"
Learning without thought is labor lost; thought without learning is perilous. Learning without thought is labor lost; thought without learning is perilous.
``` ```
@ -43,7 +43,7 @@ The Dao hides in wordlessness. Only the Dao is well begun and well
completed. completed.
``` ```
Another way to code faster is to use single-letter variable names everywhere. Like `a`, `b` or `c`. Another way to code shorter is to use single-letter variable names everywhere. Like `a`, `b` or `c`.
A short variable disappears in the code like a real ninja in the forest. No one will be able to find it using "search" of the editor. And even if someone does, they won't be able to "decipher" what the name `a` or `b` means. A short variable disappears in the code like a real ninja in the forest. No one will be able to find it using "search" of the editor. And even if someone does, they won't be able to "decipher" what the name `a` or `b` means.
@ -104,8 +104,8 @@ A quick read of such code becomes impossible. And when there's a typo... Ummm...
## Smart synonyms ## Smart synonyms
```quote author="Confucius" ```quote author="Laozi (Tao Te Ching)"
The hardest thing of all is to find a black cat in a dark room, especially if there is no cat. The Tao that can be told is not the eternal Tao. The name that can be named is not the eternal name.
``` ```
Using *similar* names for *same* things makes life more interesting and shows your creativity to the public. Using *similar* names for *same* things makes life more interesting and shows your creativity to the public.

View file

@ -2,7 +2,7 @@
Automated testing will be used in further tasks, and it's also widely used in real projects. Automated testing will be used in further tasks, and it's also widely used in real projects.
## Why we need tests? ## Why do we need tests?
When we write a function, we can usually imagine what it should do: which parameters give which results. When we write a function, we can usually imagine what it should do: which parameters give which results.
@ -51,7 +51,7 @@ describe("pow", function() {
A spec has three main building blocks that you can see above: A spec has three main building blocks that you can see above:
`describe("title", function() { ... })` `describe("title", function() { ... })`
: What functionality we're describing. In our case we're describing the function `pow`. Used to group "workers" -- the `it` blocks. : What functionality we're describing? In our case we're describing the function `pow`. Used to group "workers" -- the `it` blocks.
`it("use case description", function() { ... })` `it("use case description", function() { ... })`
: In the title of `it` we *in a human-readable way* describe the particular use case, and the second argument is a function that tests it. : In the title of `it` we *in a human-readable way* describe the particular use case, and the second argument is a function that tests it.
@ -79,7 +79,7 @@ So, the development is *iterative*. We write the spec, implement it, make sure t
Let's see this development flow in our practical case. Let's see this development flow in our practical case.
The first step is already complete: we have an initial spec for `pow`. Now, before making the implementation, let's use few JavaScript libraries to run the tests, just to see that they are working (they will all fail). The first step is already complete: we have an initial spec for `pow`. Now, before making the implementation, let's use a few JavaScript libraries to run the tests, just to see that they are working (they will all fail).
## The spec in action ## The spec in action

View file

@ -1,5 +1,11 @@
describe("test", function() { describe("test", function() {
// Mocha usually waits for the tests for 2 seconds before considering them wrong
this.timeout(200000); // With this code we increase this - in this case to 200,000 milliseconds
// This is because of the "alert" function, because if you delay pressing the "OK" button the tests will not pass!
before(() => alert("Testing started before all tests")); before(() => alert("Testing started before all tests"));
after(() => alert("Testing finished after all tests")); after(() => alert("Testing finished after all tests"));

View file

@ -1,54 +1,92 @@
# Polyfills # Polyfills and transpilers
The JavaScript language steadily evolves. New proposals to the language appear regularly, they are analyzed and, if considered worthy, are appended to the list at <https://tc39.github.io/ecma262/> and then progress to the [specification](http://www.ecma-international.org/publications/standards/Ecma-262.htm). The JavaScript language steadily evolves. New proposals to the language appear regularly, they are analyzed and, if considered worthy, are appended to the list at <https://tc39.github.io/ecma262/> and then progress to the [specification](http://www.ecma-international.org/publications/standards/Ecma-262.htm).
Teams behind JavaScript engines have their own ideas about what to implement first. They may decide to implement proposals that are in draft and postpone things that are already in the spec, because they are less interesting or just harder to do. Teams behind JavaScript engines have their own ideas about what to implement first. They may decide to implement proposals that are in draft and postpone things that are already in the spec, because they are less interesting or just harder to do.
So it's quite common for an engine to implement only the part of the standard. So it's quite common for an engine to implement only part of the standard.
A good page to see the current state of support for language features is <https://kangax.github.io/compat-table/es6/> (it's big, we have a lot to study yet). A good page to see the current state of support for language features is <https://kangax.github.io/compat-table/es6/> (it's big, we have a lot to study yet).
## Babel As programmers, we'd like to use most recent features. The more good stuff - the better!
When we use modern features of the language, some engines may fail to support such code. Just as said, not all features are implemented everywhere. On the other hand, how to make our modern code work on older engines that don't understand recent features yet?
Here Babel comes to the rescue. There are two tools for that:
[Babel](https://babeljs.io) is a [transpiler](https://en.wikipedia.org/wiki/Source-to-source_compiler). It rewrites modern JavaScript code into the previous standard. 1. Transpilers.
2. Polyfills.
Actually, there are two parts in Babel: Here, in this chapter, our purpose is to get the gist of how they work, and their place in web development.
1. First, the transpiler program, which rewrites the code. The developer runs it on their own computer. It rewrites the code into the older standard. And then the code is delivered to the website for users. Modern project build systems like [webpack](http://webpack.github.io/) provide means to run transpiler automatically on every code change, so that it's very easy to integrate into development process. ## Transpilers
2. Second, the polyfill. A [transpiler](https://en.wikipedia.org/wiki/Source-to-source_compiler) is a special piece of software that translates source code to another source code. It can parse ("read and understand") modern code and rewrite it using older syntax constructs, so that it'll also work in outdated engines.
New language features may include new built-in functions and syntax constructs. E.g. JavaScript before year 2020 didn't have the "nullish coalescing operator" `??`. So, if a visitor uses an outdated browser, it may fail to understand the code like `height = height ?? 100`.
The transpiler rewrites the code, transforming syntax constructs into older ones. But as for new built-in functions, we need to implement them. JavaScript is a highly dynamic language, scripts may add/modify any functions, so that they behave according to the modern standard.
A script that updates/adds new functions is called "polyfill". It "fills in" the gap and adds missing implementations. A transpiler would analyze our code and rewrite `height ?? 100` into `(height !== undefined && height !== null) ? height : 100`.
Two interesting polyfills are: ```js
- [core js](https://github.com/zloirock/core-js) that supports a lot, allows to include only needed features. // before running the transpiler
- [polyfill.io](http://polyfill.io) service that provides a script with polyfills, depending on the features and user's browser. height = height ?? 100;
So, if we're going to use modern language features, a transpiler and a polyfill are necessary. // after running the transpiler
height = (height !== undefined && height !== null) ? height : 100;
## Examples in the tutorial
````online
Most examples are runnable at-place, like this:
```js run
alert('Press the "Play" button in the upper-right corner to run');
``` ```
Examples that use modern JS will work only if your browser supports it. Now the rewritten code is suitable for older JavaScript engines.
````
```offline Usually, a developer runs the transpiler on their own computer, and then deploys the transpiled code to the server.
As you're reading the offline version, in PDF examples are not runnable. In EPUB some of them can run.
Speaking of names, [Babel](https://babeljs.io) is one of the most prominent transpilers out there.
Modern project build systems, such as [webpack](https://webpack.js.org/), provide a means to run a transpiler automatically on every code change, so it's very easy to integrate into the development process.
## Polyfills
New language features may include not only syntax constructs and operators, but also built-in functions.
For example, `Math.trunc(n)` is a function that "cuts off" the decimal part of a number, e.g `Math.trunc(1.23)` returns `1`.
In some (very outdated) JavaScript engines, there's no `Math.trunc`, so such code will fail.
As we're talking about new functions, not syntax changes, there's no need to transpile anything here. We just need to declare the missing function.
A script that updates/adds new functions is called "polyfill". It "fills in" the gap and adds missing implementations.
For this particular case, the polyfill for `Math.trunc` is a script that implements it, like this:
```js
if (!Math.trunc) { // if no such function
// implement it
Math.trunc = function(number) {
// Math.ceil and Math.floor exist even in ancient JavaScript engines
// they are covered later in the tutorial
return number < 0 ? Math.ceil(number) : Math.floor(number);
};
}
``` ```
Google Chrome is usually the most up-to-date with language features, good to run bleeding-edge demos without any transpilers, but other modern browsers also work fine. JavaScript is a highly dynamic language. Scripts may add/modify any function, even built-in ones.
Two interesting polyfill libraries are:
- [core js](https://github.com/zloirock/core-js) that supports a lot, allows to include only needed features.
- [polyfill.io](http://polyfill.io) service that provides a script with polyfills, depending on the features and user's browser.
## Summary
In this chapter we'd like to motivate you to study modern and even "bleeding-edge" language features, even if they aren't yet well-supported by JavaScript engines.
Just don't forget to use a transpiler (if using modern syntax or operators) and polyfills (to add functions that may be missing). They'll ensure that the code works.
For example, later when you're familiar with JavaScript, you can setup a code build system based on [webpack](https://webpack.js.org/) with the [babel-loader](https://github.com/babel/babel-loader) plugin.
Good resources that show the current state of support for various features:
- <https://kangax.github.io/compat-table/es6/> - for pure JavaScript.
- <https://caniuse.com/> - for browser-related functions.
P.S. Google Chrome is usually the most up-to-date with language features, try it if a tutorial demo fails. Most tutorial demos work with any modern browser though.

View file

@ -1,19 +0,0 @@
Sure, it works, no problem.
The `const` only protects the variable itself from changing.
In other words, `user` stores a reference to the object. And it can't be changed. But the content of the object can.
```js run
const user = {
name: "John"
};
*!*
// works
user.name = "Pete";
*/!*
// error
user = 123;
```

View file

@ -1,18 +0,0 @@
importance: 5
---
# Constant objects?
Is it possible to change an object declared with `const`? What do you think?
```js
const user = {
name: "John"
};
*!*
// does it work?
user.name = "Pete";
*/!*
```

View file

@ -2,9 +2,9 @@ importance: 3
--- ---
# Multiply numeric properties by 2 # Multiply numeric property values by 2
Create a function `multiplyNumeric(obj)` that multiplies all numeric properties of `obj` by `2`. Create a function `multiplyNumeric(obj)` that multiplies all numeric property values of `obj` by `2`.
For instance: For instance:

View file

@ -1,7 +1,7 @@
# Objects # Objects
As we know from the chapter <info:types>, there are seven data types in JavaScript. Six of them are called "primitive", because their values contain only a single thing (be it a string or a number or whatever). As we know from the chapter <info:types>, there are eight data types in JavaScript. Seven of them are called "primitive", because their values contain only a single thing (be it a string or a number or whatever).
In contrast, objects are used to store keyed collections of various data and more complex entities. In JavaScript, objects penetrate almost every aspect of the language. So we must understand them first before going in-depth anywhere else. In contrast, objects are used to store keyed collections of various data and more complex entities. In JavaScript, objects penetrate almost every aspect of the language. So we must understand them first before going in-depth anywhere else.
@ -44,7 +44,7 @@ The resulting `user` object can be imagined as a cabinet with two signed files l
![user object](object-user.svg) ![user object](object-user.svg)
We can add, remove and read files from it any time. We can add, remove and read files from it at any time.
Property values are accessible using the dot notation: Property values are accessible using the dot notation:
@ -62,7 +62,7 @@ user.isAdmin = true;
![user object 2](object-user-isadmin.svg) ![user object 2](object-user-isadmin.svg)
To remove a property, we can use `delete` operator: To remove a property, we can use the `delete` operator:
```js ```js
delete user.age; delete user.age;
@ -101,7 +101,9 @@ For multiword properties, the dot access doesn't work:
user.likes birds = true user.likes birds = true
``` ```
That's because the dot requires the key to be a valid variable identifier. That is: no spaces and other limitations. JavaScript doesn't understand that. It thinks that we address `user.likes`, and then gives a syntax error when comes across unexpected `birds`.
The dot requires the key to be a valid variable identifier. That implies: contains no spaces, doesn't start with a digit and doesn't include special characters (`$` and `_` are allowed).
There's an alternative "square bracket notation" that works with any string: There's an alternative "square bracket notation" that works with any string:
@ -159,7 +161,7 @@ alert( user.key ) // undefined
### Computed properties ### Computed properties
We can use square brackets in an object literal. That's called *computed properties*. We can use square brackets in an object literal, when creating an object. That's called *computed properties*.
For instance: For instance:
@ -199,50 +201,13 @@ let bag = {
}; };
``` ```
Square brackets are much more powerful than the dot notation. They allow any property names and variables. But they are also more cumbersome to write. Square brackets are much more powerful than dot notation. They allow any property names and variables. But they are also more cumbersome to write.
So most of the time, when property names are known and simple, the dot is used. And if we need something more complex, then we switch to square brackets. So most of the time, when property names are known and simple, the dot is used. And if we need something more complex, then we switch to square brackets.
````smart header="Reserved words are allowed as property names"
A variable cannot have a name equal to one of language-reserved words like "for", "let", "return" etc.
But for an object property, there's no such restriction. Any name is fine:
```js run
let obj = {
for: 1,
let: 2,
return: 3
};
alert( obj.for + obj.let + obj.return ); // 6
```
Basically, any name is allowed, but there's a special one: `"__proto__"` that gets special treatment for historical reasons. For instance, we can't set it to a non-object value:
```js run
let obj = {};
obj.__proto__ = 5;
alert(obj.__proto__); // [object Object], didn't work as intended
```
As we see from the code, the assignment to a primitive `5` is ignored.
That can become a source of bugs and even vulnerabilities if we intend to store arbitrary key-value pairs in an object, and allow a visitor to specify the keys.
In that case the visitor may choose `__proto__` as the key, and the assignment logic will be ruined (as shown above).
There is a way to make objects treat `__proto__` as a regular property, which we'll cover later, but first we need to know more about objects.
There's also another data structure [Map](info:map-set), that we'll learn in the chapter <info:map-set>, which supports arbitrary keys.
````
## Property value shorthand ## Property value shorthand
In real code we often use existing variables as values for property names. In real code, we often use existing variables as values for property names.
For instance: For instance:
@ -250,7 +215,7 @@ For instance:
function makeUser(name, age) { function makeUser(name, age) {
return { return {
name: name, name: name,
age: age age: age,
// ...other properties // ...other properties
}; };
} }
@ -268,7 +233,7 @@ function makeUser(name, age) {
*!* *!*
return { return {
name, // same as name: name name, // same as name: name
age // same as age: age age, // same as age: age
// ... // ...
}; };
*/!* */!*
@ -284,9 +249,57 @@ let user = {
}; };
``` ```
## Existence check
A notable objects feature is that it's possible to access any property. There will be no error if the property doesn't exist! Accessing a non-existing property just returns `undefined`. It provides a very common way to test whether the property exists -- to get it and compare vs undefined: ## Property names limitations
As we already know, a variable cannot have a name equal to one of the language-reserved words like "for", "let", "return" etc.
But for an object property, there's no such restriction:
```js run
// these properties are all right
let obj = {
for: 1,
let: 2,
return: 3
};
alert( obj.for + obj.let + obj.return ); // 6
```
In short, there are no limitations on property names. They can be any strings or symbols (a special type for identifiers, to be covered later).
Other types are automatically converted to strings.
For instance, a number `0` becomes a string `"0"` when used as a property key:
```js run
let obj = {
0: "test" // same as "0": "test"
};
// both alerts access the same property (the number 0 is converted to string "0")
alert( obj["0"] ); // test
alert( obj[0] ); // test (same property)
```
There's a minor gotcha with a special property named `__proto__`. We can't set it to a non-object value:
```js run
let obj = {};
obj.__proto__ = 5; // assign a number
alert(obj.__proto__); // [object Object] - the value is an object, didn't work as intended
```
As we see from the code, the assignment to a primitive `5` is ignored.
We'll cover the special nature of `__proto__` in [subsequent chapters](info:prototype-inheritance), and suggest the [ways to fix](info:prototype-methods) such behavior.
## Property existence test, "in" operator
A notable feature of objects in JavaScript, compared to many other languages, is that it's possible to access any property. There will be no error if the property doesn't exist!
Reading a non-existing property just returns `undefined`. So we can easily test whether the property exists:
```js run ```js run
let user = {}; let user = {};
@ -294,7 +307,7 @@ let user = {};
alert( user.noSuchProperty === undefined ); // true means "no such property" alert( user.noSuchProperty === undefined ); // true means "no such property"
``` ```
There also exists a special operator `"in"` to check for the existence of a property. There's also a special operator `"in"` for that.
The syntax is: The syntax is:
```js ```js
@ -312,17 +325,18 @@ alert( "blabla" in user ); // false, user.blabla doesn't exist
Please note that on the left side of `in` there must be a *property name*. That's usually a quoted string. Please note that on the left side of `in` there must be a *property name*. That's usually a quoted string.
If we omit quotes, that would mean a variable containing the actual name will be tested. For instance: If we omit quotes, that means a variable should contain the actual name to be tested. For instance:
```js run ```js run
let user = { age: 30 }; let user = { age: 30 };
let key = "age"; let key = "age";
alert( *!*key*/!* in user ); // true, takes the name from key and checks for such property alert( *!*key*/!* in user ); // true, property "age" exists
``` ```
````smart header="Using \"in\" for properties that store `undefined`" Why does the `in` operator exist? Isn't it enough to compare against `undefined`?
Usually, the strict comparison `"=== undefined"` check the property existence just fine. But there's a special case when it fails, but `"in"` works correctly.
Well, most of the time the comparison with `undefined` works fine. But there's a special case when it fails, but `"in"` works correctly.
It's when an object property exists, but stores `undefined`: It's when an object property exists, but stores `undefined`:
@ -336,13 +350,12 @@ alert( obj.test ); // it's undefined, so - no such property?
alert( "test" in obj ); // true, the property does exist! alert( "test" in obj ); // true, the property does exist!
``` ```
In the code above, the property `obj.test` technically exists. So the `in` operator works right. In the code above, the property `obj.test` technically exists. So the `in` operator works right.
Situations like this happen very rarely, because `undefined` is usually not assigned. We mostly use `null` for "unknown" or "empty" values. So the `in` operator is an exotic guest in the code. Situations like this happen very rarely, because `undefined` should not be explicitly assigned. We mostly use `null` for "unknown" or "empty" values. So the `in` operator is an exotic guest in the code.
````
## The "for..in" loop
## The "for..in" loop [#forin]
To walk over all keys of an object, there exists a special form of the loop: `for..in`. This is a completely different thing from the `for(;;)` construct that we studied before. To walk over all keys of an object, there exists a special form of the loop: `for..in`. This is a completely different thing from the `for(;;)` construct that we studied before.
@ -375,7 +388,6 @@ Note that all "for" constructs allow us to declare the looping variable inside t
Also, we could use another variable name here instead of `key`. For instance, `"for (let prop in obj)"` is also widely used. Also, we could use another variable name here instead of `key`. For instance, `"for (let prop in obj)"` is also widely used.
### Ordered like an object ### Ordered like an object
Are objects ordered? In other words, if we loop over an object, do we get all properties in the same order they were added? Can we rely on this? Are objects ordered? In other words, if we loop over an object, do we get all properties in the same order they were added? Can we rely on this?
@ -400,7 +412,7 @@ for (let code in codes) {
*/!* */!*
``` ```
The object may be used to suggest a list of options to the user. If we're making a site mainly for German audience then we probably want `49` to be the first. The object may be used to suggest a list of options to the user. If we're making a site mainly for a German audience then we probably want `49` to be the first.
But if we run the code, we see a totally different picture: But if we run the code, we see a totally different picture:
@ -412,9 +424,10 @@ The phone codes go in the ascending sorted order, because they are integers. So
````smart header="Integer properties? What's that?" ````smart header="Integer properties? What's that?"
The "integer property" term here means a string that can be converted to-and-from an integer without a change. The "integer property" term here means a string that can be converted to-and-from an integer without a change.
So, "49" is an integer property name, because when it's transformed to an integer number and back, it's still the same. But "+49" and "1.2" are not: So, `"49"` is an integer property name, because when it's transformed to an integer number and back, it's still the same. But `"+49"` and `"1.2"` are not:
```js run ```js run
// Number(...) explicitly converts to a number
// Math.trunc is a built-in function that removes the decimal part // Math.trunc is a built-in function that removes the decimal part
alert( String(Math.trunc(Number("49"))) ); // "49", same, integer property alert( String(Math.trunc(Number("49"))) ); // "49", same, integer property
alert( String(Math.trunc(Number("+49"))) ); // "49", not same "+49" ⇒ not integer property alert( String(Math.trunc(Number("+49"))) ); // "49", not same "+49" ⇒ not integer property
@ -459,262 +472,6 @@ for (let code in codes) {
Now it works as intended. Now it works as intended.
## Copying by reference
One of the fundamental differences of objects vs primitives is that they are stored and copied "by reference".
Primitive values: strings, numbers, booleans -- are assigned/copied "as a whole value".
For instance:
```js
let message = "Hello!";
let phrase = message;
```
As a result we have two independent variables, each one is storing the string `"Hello!"`.
![](variable-copy-value.svg)
Objects are not like that.
**A variable stores not the object itself, but its "address in memory", in other words "a reference" to it.**
Here's the picture for the object:
```js
let user = {
name: "John"
};
```
![](variable-contains-reference.svg)
Here, the object is stored somewhere in memory. And the variable `user` has a "reference" to it.
**When an object variable is copied -- the reference is copied, the object is not duplicated.**
If we imagine an object as a cabinet, then a variable is a key to it. Copying a variable duplicates the key, but not the cabinet itself.
For instance:
```js no-beautify
let user = { name: "John" };
let admin = user; // copy the reference
```
Now we have two variables, each one with the reference to the same object:
![](variable-copy-reference.svg)
We can use any variable to access the cabinet and modify its contents:
```js run
let user = { name: 'John' };
let admin = user;
*!*
admin.name = 'Pete'; // changed by the "admin" reference
*/!*
alert(*!*user.name*/!*); // 'Pete', changes are seen from the "user" reference
```
The example above demonstrates that there is only one object. As if we had a cabinet with two keys and used one of them (`admin`) to get into it. Then, if we later use the other key (`user`) we would see changes.
### Comparison by reference
The equality `==` and strict equality `===` operators for objects work exactly the same.
**Two objects are equal only if they are the same object.**
For instance, if two variables reference the same object, they are equal:
```js run
let a = {};
let b = a; // copy the reference
alert( a == b ); // true, both variables reference the same object
alert( a === b ); // true
```
And here two independent objects are not equal, even though both are empty:
```js run
let a = {};
let b = {}; // two independent objects
alert( a == b ); // false
```
For comparisons like `obj1 > obj2` or for a comparison against a primitive `obj == 5`, objects are converted to primitives. We'll study how object conversions work very soon, but to tell the truth, such comparisons are necessary very rarely and usually are a result of a coding mistake.
### Const object
An object declared as `const` *can* be changed.
For instance:
```js run
const user = {
name: "John"
};
*!*
user.age = 25; // (*)
*/!*
alert(user.age); // 25
```
It might seem that the line `(*)` would cause an error, but no, there's totally no problem. That's because `const` fixes only value of `user` itself. And here `user` stores the reference to the same object all the time. The line `(*)` goes *inside* the object, it doesn't reassign `user`.
The `const` would give an error if we try to set `user` to something else, for instance:
```js run
const user = {
name: "John"
};
*!*
// Error (can't reassign user)
*/!*
user = {
name: "Pete"
};
```
...But what if we want to make constant object properties? So that `user.age = 25` would give an error. That's possible too. We'll cover it in the chapter <info:property-descriptors>.
## Cloning and merging, Object.assign
So, copying an object variable creates one more reference to the same object.
But what if we need to duplicate an object? Create an independent copy, a clone?
That's also doable, but a little bit more difficult, because there's no built-in method for that in JavaScript. Actually, that's rarely needed. Copying by reference is good most of the time.
But if we really want that, then we need to create a new object and replicate the structure of the existing one by iterating over its properties and copying them on the primitive level.
Like this:
```js run
let user = {
name: "John",
age: 30
};
*!*
let clone = {}; // the new empty object
// let's copy all user properties into it
for (let key in user) {
clone[key] = user[key];
}
*/!*
// now clone is a fully independent clone
clone.name = "Pete"; // changed the data in it
alert( user.name ); // still John in the original object
```
Also we can use the method [Object.assign](mdn:js/Object/assign) for that.
The syntax is:
```js
Object.assign(dest, [src1, src2, src3...])
```
- Arguments `dest`, and `src1, ..., srcN` (can be as many as needed) are objects.
- It copies the properties of all objects `src1, ..., srcN` into `dest`. In other words, properties of all arguments starting from the 2nd are copied into the 1st. Then it returns `dest`.
For instance, we can use it to merge several objects into one:
```js
let user = { name: "John" };
let permissions1 = { canView: true };
let permissions2 = { canEdit: true };
*!*
// copies all properties from permissions1 and permissions2 into user
Object.assign(user, permissions1, permissions2);
*/!*
// now user = { name: "John", canView: true, canEdit: true }
```
If the receiving object (`user`) already has the same named property, it will be overwritten:
```js
let user = { name: "John" };
// overwrite name, add isAdmin
Object.assign(user, { name: "Pete", isAdmin: true });
// now user = { name: "Pete", isAdmin: true }
```
We also can use `Object.assign` to replace the loop for simple cloning:
```js
let user = {
name: "John",
age: 30
};
*!*
let clone = Object.assign({}, user);
*/!*
```
It copies all properties of `user` into the empty object and returns it. Actually, the same as the loop, but shorter.
Until now we assumed that all properties of `user` are primitive. But properties can be references to other objects. What to do with them?
Like this:
```js run
let user = {
name: "John",
sizes: {
height: 182,
width: 50
}
};
alert( user.sizes.height ); // 182
```
Now it's not enough to copy `clone.sizes = user.sizes`, because the `user.sizes` is an object, it will be copied by reference. So `clone` and `user` will share the same sizes:
Like this:
```js run
let user = {
name: "John",
sizes: {
height: 182,
width: 50
}
};
let clone = Object.assign({}, user);
alert( user.sizes === clone.sizes ); // true, same object
// user and clone share sizes
user.sizes.width++; // change a property from one place
alert(clone.sizes.width); // 51, see the result from the other one
```
To fix that, we should use the cloning loop that examines each value of `user[key]` and, if it's an object, then replicate its structure as well. That is called a "deep cloning".
There's a standard algorithm for deep cloning that handles the case above and more complex cases, called the [Structured cloning algorithm](https://html.spec.whatwg.org/multipage/structured-data.html#safe-passing-of-structured-data). In order not to reinvent the wheel, we can use a working implementation of it from the JavaScript library [lodash](https://lodash.com), the method is called [_.cloneDeep(obj)](https://lodash.com/docs#cloneDeep).
## Summary ## Summary
Objects are associative arrays with several special features. Objects are associative arrays with several special features.
@ -725,17 +482,13 @@ They store properties (key-value pairs), where:
To access a property, we can use: To access a property, we can use:
- The dot notation: `obj.property`. - The dot notation: `obj.property`.
- Square brackets notation `obj["property"]`. Square brackets allow to take the key from a variable, like `obj[varWithKey]`. - Square brackets notation `obj["property"]`. Square brackets allow taking the key from a variable, like `obj[varWithKey]`.
Additional operators: Additional operators:
- To delete a property: `delete obj.prop`. - To delete a property: `delete obj.prop`.
- To check if a property with the given key exists: `"key" in obj`. - To check if a property with the given key exists: `"key" in obj`.
- To iterate over an object: `for (let key in obj)` loop. - To iterate over an object: `for (let key in obj)` loop.
Objects are assigned and copied by reference. In other words, a variable stores not the "object value", but a "reference" (address in memory) for the value. So copying such a variable or passing it as a function argument copies that reference, not the object. All operations via copied references (like adding/removing properties) are performed on the same single object.
To make a "real copy" (a clone) we can use `Object.assign` or [_.cloneDeep(obj)](https://lodash.com/docs#cloneDeep).
What we've studied in this chapter is called a "plain object", or just `Object`. What we've studied in this chapter is called a "plain object", or just `Object`.
There are many other kinds of objects in JavaScript: There are many other kinds of objects in JavaScript:

View file

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="248" height="173" viewBox="0 0 248 173"><defs><style>@import url(https://fonts.googleapis.com/css?family=Open+Sans:bold,italic,bolditalic%7CPT+Mono);@font-face{font-family:&apos;PT Mono&apos;;font-weight:700;font-style:normal;src:local(&apos;PT MonoBold&apos;),url(/font/PTMonoBold.woff2) format(&apos;woff2&apos;),url(/font/PTMonoBold.woff) format(&apos;woff&apos;),url(/font/PTMonoBold.ttf) format(&apos;truetype&apos;)}</style></defs><g id="combined" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="object-user-delete.svg"><path fill="#FFF" d="M0 0h248v173H0z"/><path id="Rectangle-4-Copy" fill="#D1C4B1" stroke="#D1C4B1" stroke-width="4" d="M127.937 101l-16.667 20h130.46l-16.667-20h-97.126z" opacity=".5"/><g id="Group-2" transform="translate(141 8)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v110H0z"/><path id="Combined-Shape" fill="#E8C48F" d="M32 0v110H0V0h32zM16.5 88.71c-4.142 0-7.5 2.978-7.5 6.653 0 3.674 3.358 6.653 7.5 6.653 4.142 0 7.5-2.979 7.5-6.653 0-3.675-3.358-6.653-7.5-6.653zM28 4.435H4v77.178h24V4.435z"/></g><text id="name" fill="#EE6B47" font-family="PTMono-Bold, PT Mono" font-size="14" font-weight="bold" transform="rotate(-90 15.5 42.859)"><tspan x="-1.3" y="47.359">name</tspan></text></g><g id="Group-2-Copy-2" transform="translate(179 8)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v110H0z"/><path id="Combined-Shape" fill="#E8C48F" d="M32 0v110H0V0h32zM16.5 88.71c-4.142 0-7.5 2.978-7.5 6.653 0 3.674 3.358 6.653 7.5 6.653 4.142 0 7.5-2.979 7.5-6.653 0-3.675-3.358-6.653-7.5-6.653zM28 4.435H4v77.178h24V4.435z"/></g><text id="isAdmin" fill="#EE6B47" font-family="PTMono-Bold, PT Mono" font-size="14" font-weight="bold" transform="rotate(-90 14.5 41.653)"><tspan x="-14.9" y="46.153">isAdmin</tspan></text></g><path id="Rectangle-4" fill="#FFF9EB" stroke="#BCA68E" stroke-width="4" d="M109 115h135v50H109z"/><path id="Rectangle-8" stroke="#BCA68E" stroke-width="3" d="M164.5 135.5h25v10h-25z"/><text id="user" fill="#EE6B47" font-family="OpenSans-Bold, Open Sans" font-size="14" font-weight="bold"><tspan x="9" y="145">user</tspan></text><path id="Line-8" fill="#EE6B47" fill-rule="nonzero" d="M75.5 131l19 9.5-19 9.5v-8H49v-3h26.5v-8z"/></g></g></svg> <svg xmlns="http://www.w3.org/2000/svg" width="248" height="173" viewBox="0 0 248 173"><defs><style>@import url(https://fonts.googleapis.com/css?family=Open+Sans:bold,italic,bolditalic%7CPT+Mono);@font-face{font-family:&apos;PT Mono&apos;;font-weight:700;font-style:normal;src:local(&apos;PT MonoBold&apos;),url(/font/PTMonoBold.woff2) format(&apos;woff2&apos;),url(/font/PTMonoBold.woff) format(&apos;woff&apos;),url(/font/PTMonoBold.ttf) format(&apos;truetype&apos;)}</style></defs><g id="combined" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="object-user-delete.svg"><path fill="#FFF" d="M0 0h248v173H0z"/><path id="Rectangle-4-Copy" fill="#DBAF88" stroke="#DBAF88" stroke-width="4" d="M225.063 101l16.667 20H111.27l16.667-20h97.126z" opacity=".5"/><g id="Group-2" transform="translate(141 8)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v110H0z"/><path id="Combined-Shape" fill="#DBAF88" d="M32 0v110H0V0h32zM16.5 88.71c-4.142 0-7.5 2.978-7.5 6.653 0 3.674 3.358 6.653 7.5 6.653 4.142 0 7.5-2.979 7.5-6.653 0-3.675-3.358-6.653-7.5-6.653zM28 4.435H4v77.178h24V4.435z"/></g><text id="name" fill="#C06334" font-family="PTMono-Bold, PT Mono" font-size="14" font-weight="bold" transform="rotate(-90 15.5 42.859)"><tspan x="-1.3" y="47.359">name</tspan></text></g><g id="Group-2-Copy-2" transform="translate(179 8)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v110H0z"/><path id="Combined-Shape" fill="#DBAF88" d="M32 0v110H0V0h32zM16.5 88.71c-4.142 0-7.5 2.978-7.5 6.653 0 3.674 3.358 6.653 7.5 6.653 4.142 0 7.5-2.979 7.5-6.653 0-3.675-3.358-6.653-7.5-6.653zM28 4.435H4v77.178h24V4.435z"/></g><text id="isAdmin" fill="#C06334" font-family="PTMono-Bold, PT Mono" font-size="14" font-weight="bold" transform="rotate(-90 14.5 41.653)"><tspan x="-14.9" y="46.153">isAdmin</tspan></text></g><path id="Rectangle-4" fill="#FBF2EC" stroke="#DBAF88" stroke-width="4" d="M109 115h135v50H109z"/><path id="Rectangle-8" stroke="#DBAF88" stroke-width="3" d="M164.5 135.5h25v10h-25z"/><text id="user" fill="#C06334" font-family="OpenSans-Bold, Open Sans" font-size="14" font-weight="bold"><tspan x="9" y="145">user</tspan></text><path id="Line-8" fill="#C06334" fill-rule="nonzero" d="M75.5 131l19 9.5-19 9.5v-8H49v-3h26.5v-8z"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before After
Before After

View file

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="248" height="92" viewBox="0 0 248 92"><defs><style>@import url(https://fonts.googleapis.com/css?family=Open+Sans:bold,italic,bolditalic%7CPT+Mono);@font-face{font-family:&apos;PT Mono&apos;;font-weight:700;font-style:normal;src:local(&apos;PT MonoBold&apos;),url(/font/PTMonoBold.woff2) format(&apos;woff2&apos;),url(/font/PTMonoBold.woff) format(&apos;woff&apos;),url(/font/PTMonoBold.ttf) format(&apos;truetype&apos;)}</style></defs><g id="combined" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="object-user-empty.svg"><path fill="#FFF" d="M0 0h248v92H0z"/><path id="Rectangle-4-Copy" fill="#D1C4B1" stroke="#D1C4B1" stroke-width="4" d="M123.937 12L107.27 32h130.46l-16.667-20h-97.126z" opacity=".5"/><path id="Rectangle-4" fill="#FFF9EB" stroke="#BCA68E" stroke-width="4" d="M105 26h135v50H105z"/><path id="Rectangle-8" stroke="#BCA68E" stroke-width="3" d="M160.5 46.5h25v10h-25z"/><text id="empty" fill="#9B9B9B" font-family="OpenSans-Regular, Open Sans" font-size="14" font-weight="normal"><tspan x="151" y="22">empty</tspan></text><text id="user" fill="#EE6B47" font-family="OpenSans-Bold, Open Sans" font-size="14" font-weight="bold"><tspan x="4" y="56">user</tspan></text><path id="Line-8" fill="#EE6B47" fill-rule="nonzero" d="M70.5 42l19 9.5-19 9.5v-8H44v-3h26.5v-8z"/></g></g></svg> <svg xmlns="http://www.w3.org/2000/svg" width="248" height="92" viewBox="0 0 248 92"><defs><style>@import url(https://fonts.googleapis.com/css?family=Open+Sans:bold,italic,bolditalic%7CPT+Mono);@font-face{font-family:&apos;PT Mono&apos;;font-weight:700;font-style:normal;src:local(&apos;PT MonoBold&apos;),url(/font/PTMonoBold.woff2) format(&apos;woff2&apos;),url(/font/PTMonoBold.woff) format(&apos;woff&apos;),url(/font/PTMonoBold.ttf) format(&apos;truetype&apos;)}</style></defs><g id="combined" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="object-user-empty.svg"><path fill="#FFF" d="M0 0h248v92H0z"/><path id="Rectangle-4-Copy" fill="#DBAF88" stroke="#DBAF88" stroke-width="4" d="M221.063 12l16.667 20H107.27l16.667-20h97.126z" opacity=".5"/><path id="Rectangle-4" fill="#FBF2EC" stroke="#DBAF88" stroke-width="4" d="M105 26h135v50H105z"/><path id="Rectangle-8" stroke="#DBAF88" stroke-width="3" d="M160.5 46.5h25v10h-25z"/><text id="empty" fill="#7E7C7B" font-family="OpenSans-Regular, Open Sans" font-size="14" font-weight="normal"><tspan x="151" y="22">empty</tspan></text><text id="user" fill="#C06334" font-family="OpenSans-Bold, Open Sans" font-size="14" font-weight="bold"><tspan x="4" y="56">user</tspan></text><path id="Line-8" fill="#C06334" fill-rule="nonzero" d="M70.5 42l19 9.5-19 9.5v-8H44v-3h26.5v-8z"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before After
Before After

View file

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="248" height="173" viewBox="0 0 248 173"><defs><style>@import url(https://fonts.googleapis.com/css?family=Open+Sans:bold,italic,bolditalic%7CPT+Mono);@font-face{font-family:&apos;PT Mono&apos;;font-weight:700;font-style:normal;src:local(&apos;PT MonoBold&apos;),url(/font/PTMonoBold.woff2) format(&apos;woff2&apos;),url(/font/PTMonoBold.woff) format(&apos;woff&apos;),url(/font/PTMonoBold.ttf) format(&apos;truetype&apos;)}</style></defs><g id="combined" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="object-user-isadmin.svg"><path fill="#FFF" d="M0 0h248v173H0z"/><path id="Rectangle-4-Copy" fill="#D1C4B1" stroke="#D1C4B1" stroke-width="4" d="M127.937 101l-16.667 20h130.46l-16.667-20h-97.126z" opacity=".5"/><g id="Group-2" transform="translate(125 8)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v110H0z"/><path id="Combined-Shape" fill="#E8C48F" d="M32 0v110H0V0h32zM16.5 88.71c-4.142 0-7.5 2.978-7.5 6.653 0 3.674 3.358 6.653 7.5 6.653 4.142 0 7.5-2.979 7.5-6.653 0-3.675-3.358-6.653-7.5-6.653zM28 4.435H4v77.178h24V4.435z"/></g><text id="name" fill="#EE6B47" font-family="PTMono-Bold, PT Mono" font-size="14" font-weight="bold" transform="rotate(-90 15.5 42.859)"><tspan x="-1.3" y="47.359">name</tspan></text></g><g id="Group-2-Copy" transform="translate(162 8)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v110H0z"/><path id="Combined-Shape" fill="#E8C48F" d="M32 0v110H0V0h32zM16.5 88.71c-4.142 0-7.5 2.978-7.5 6.653 0 3.674 3.358 6.653 7.5 6.653 4.142 0 7.5-2.979 7.5-6.653 0-3.675-3.358-6.653-7.5-6.653zM28 4.435H4v77.178h24V4.435z"/></g><text id="age" fill="#EE6B47" font-family="PTMono-Bold, PT Mono" font-size="14" font-weight="bold" transform="rotate(-90 14.5 41.653)"><tspan x="1.9" y="46.153">age</tspan></text></g><g id="Group-2-Copy-2" transform="translate(199 8)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v110H0z"/><path id="Combined-Shape" fill="#E8C48F" d="M32 0v110H0V0h32zM16.5 88.71c-4.142 0-7.5 2.978-7.5 6.653 0 3.674 3.358 6.653 7.5 6.653 4.142 0 7.5-2.979 7.5-6.653 0-3.675-3.358-6.653-7.5-6.653zM28 4.435H4v77.178h24V4.435z"/></g><text id="isAdmin" fill="#EE6B47" font-family="PTMono-Bold, PT Mono" font-size="14" font-weight="bold" transform="rotate(-90 14.5 41.653)"><tspan x="-14.9" y="46.153">isAdmin</tspan></text></g><path id="Rectangle-4" fill="#FFF9EB" stroke="#BCA68E" stroke-width="4" d="M109 115h135v50H109z"/><path id="Rectangle-8" stroke="#BCA68E" stroke-width="3" d="M164.5 135.5h25v10h-25z"/><text id="user" fill="#EE6B47" font-family="OpenSans-Bold, Open Sans" font-size="14" font-weight="bold"><tspan x="12" y="145">user</tspan></text><path id="Line-8" fill="#EE6B47" fill-rule="nonzero" d="M78.5 131l19 9.5-19 9.5v-8H52v-3h26.5v-8z"/></g></g></svg> <svg xmlns="http://www.w3.org/2000/svg" width="248" height="173" viewBox="0 0 248 173"><defs><style>@import url(https://fonts.googleapis.com/css?family=Open+Sans:bold,italic,bolditalic%7CPT+Mono);@font-face{font-family:&apos;PT Mono&apos;;font-weight:700;font-style:normal;src:local(&apos;PT MonoBold&apos;),url(/font/PTMonoBold.woff2) format(&apos;woff2&apos;),url(/font/PTMonoBold.woff) format(&apos;woff&apos;),url(/font/PTMonoBold.ttf) format(&apos;truetype&apos;)}</style></defs><g id="combined" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="object-user-isadmin.svg"><path fill="#FFF" d="M0 0h248v173H0z"/><path id="Rectangle-4-Copy" fill="#DBAF88" stroke="#DBAF88" stroke-width="4" d="M225.063 101l16.667 20H111.27l16.667-20h97.126z" opacity=".5"/><g id="Group-2" transform="translate(125 8)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v110H0z"/><path id="Combined-Shape" fill="#DBAF88" d="M32 0v110H0V0h32zM16.5 88.71c-4.142 0-7.5 2.978-7.5 6.653 0 3.674 3.358 6.653 7.5 6.653 4.142 0 7.5-2.979 7.5-6.653 0-3.675-3.358-6.653-7.5-6.653zM28 4.435H4v77.178h24V4.435z"/></g><text id="name" fill="#C06334" font-family="PTMono-Bold, PT Mono" font-size="14" font-weight="bold" transform="rotate(-90 15.5 42.859)"><tspan x="-1.3" y="47.359">name</tspan></text></g><g id="Group-2-Copy" transform="translate(162 8)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v110H0z"/><path id="Combined-Shape" fill="#DBAF88" d="M32 0v110H0V0h32zM16.5 88.71c-4.142 0-7.5 2.978-7.5 6.653 0 3.674 3.358 6.653 7.5 6.653 4.142 0 7.5-2.979 7.5-6.653 0-3.675-3.358-6.653-7.5-6.653zM28 4.435H4v77.178h24V4.435z"/></g><text id="age" fill="#C06334" font-family="PTMono-Bold, PT Mono" font-size="14" font-weight="bold" transform="rotate(-90 14.5 41.653)"><tspan x="1.9" y="46.153">age</tspan></text></g><g id="Group-2-Copy-2" transform="translate(199 8)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v110H0z"/><path id="Combined-Shape" fill="#DBAF88" d="M32 0v110H0V0h32zM16.5 88.71c-4.142 0-7.5 2.978-7.5 6.653 0 3.674 3.358 6.653 7.5 6.653 4.142 0 7.5-2.979 7.5-6.653 0-3.675-3.358-6.653-7.5-6.653zM28 4.435H4v77.178h24V4.435z"/></g><text id="isAdmin" fill="#C06334" font-family="PTMono-Bold, PT Mono" font-size="14" font-weight="bold" transform="rotate(-90 14.5 41.653)"><tspan x="-14.9" y="46.153">isAdmin</tspan></text></g><path id="Rectangle-4" fill="#FBF2EC" stroke="#DBAF88" stroke-width="4" d="M109 115h135v50H109z"/><path id="Rectangle-8" stroke="#DBAF88" stroke-width="3" d="M164.5 135.5h25v10h-25z"/><text id="user" fill="#C06334" font-family="OpenSans-Bold, Open Sans" font-size="14" font-weight="bold"><tspan x="12" y="145">user</tspan></text><path id="Line-8" fill="#C06334" fill-rule="nonzero" d="M78.5 131l19 9.5-19 9.5v-8H52v-3h26.5v-8z"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Before After
Before After

Some files were not shown because too many files have changed in this diff Show more