Compare commits

..

1522 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
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
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
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
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
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
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
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
Peter Kampjes
9bae8fdf3e
Typos 2020-09-21 18:25:55 -03:00
564 changed files with 4846 additions and 3261 deletions

1
.gitignore vendored
View file

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

View file

@ -1,27 +0,0 @@
# Hello, JavaScript!
JavaScript was created in 1995 as a simple language exclusively for web browsers, to "make web pages alive". Since then it has greatly evolved, it's quite far from there it started.
Today we can use JavaScript on many platforms:
- In a web-browser, by embedding it into a web page.
- On a general purpose computer or a server, using [Node.js](https://nodejs.org) and other means.
- ...Or actually on any device that has a special piece of software, called "a JavaScript engine".
Technically, even a coffee machine can include its own JavaScript engine to allow programming of coffee recipes.
![](javascript-engine.svg)
```smart header="Where to read?"
There's a formal language description called [ECMAScript Language Specification](https://tc39.es/ecma262/), it describes how a JavaScript engine works. Sometimes we'll give references to it, but, though technically correct, it's hard to read for humans.
Also, there's a good JavaScript reference at [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference). One can type `mdn <a javascript term>` in an internet search engine to find the information about that term there.
```
Programs in JavaScript are called "scripts".
**In this tutorial we concentrate on the "core" JavaScript, that works mostly everywhere.**
Then, after you're familiar with it, you'll be able to move in any direction: browsers, servers and so on.
Turn the page to start learning JavaScript!

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="453" height="129" viewBox="0 0 453 129"><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="v2" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="javascript-engine.svg"><g id="noun_Server_1653092" fill="#000" fill-rule="nonzero" opacity=".812" transform="translate(366 15)"><path id="Shape" d="M13 86a6 6 0 016-6h16a6 6 0 016 6v2h13V0H0v88h13v-2zm37-2h-5.2a10 10 0 00-1.8-4h7v4zM4 4h46v72H4V4zm5.2 80H4v-4h7a10 10 0 00-1.8 4z"/><path id="Rectangle" d="M12 10h30v4H12zM12 20h30v4H12zM12 30h30v4H12zM12 40h30v4H12zM12 50h30v4H12zM27 63h8v4h-8z"/><circle id="Oval" cx="14" cy="65" r="2"/><circle id="Oval" cx="22" cy="65" r="2"/><circle id="Oval" cx="40" cy="65" r="2"/></g><g id="noun_Coffee-Machine_1997833" fill="#000" fill-rule="nonzero" opacity=".812" transform="translate(187 15)"><path id="Shape" d="M88.577 0H5.423C2.428 0 0 2.63 0 5.875V23.5c0 3.245 2.428 5.875 5.423 5.875v48.958C2.428 78.333 0 80.963 0 84.208v3.917C0 91.37 2.428 94 5.423 94h83.154C91.572 94 94 91.37 94 88.125v-3.917c0-3.244-2.428-5.875-5.423-5.875V29.375c2.995 0 5.423-2.63 5.423-5.875V5.875C94 2.63 91.572 0 88.577 0zm1.808 84.208v3.917c0 1.082-.81 1.958-1.808 1.958H5.423c-.998 0-1.808-.876-1.808-1.958v-3.917c0-1.081.81-1.958 1.808-1.958h83.154c.998 0 1.808.877 1.808 1.958zm-56.039-11.75V56.792c0-2.163 1.619-3.917 3.616-3.917h18.076c1.997 0 3.616 1.754 3.616 3.917v15.666c0 3.245-2.428 5.875-5.423 5.875H39.769c-2.995 0-5.423-2.63-5.423-5.875zm50.616 5.875h-23.5a9.973 9.973 0 001.102-1.958c5.444-.252 9.739-5.103 9.744-11.006V63.9c0-6.028-4.469-10.94-10.033-11.025-1.287-2.415-3.662-3.907-6.237-3.917H37.962c-3.994 0-7.231 3.507-7.231 7.834v15.666c0 2.119.634 4.18 1.807 5.875h-23.5V29.375h75.924v48.958zM68.692 63.9v1.47c-.004 3.446-2.29 6.392-5.423 6.99V56.89c3.14.599 5.428 3.557 5.423 7.01zm21.693-40.4c0 1.082-.81 1.958-1.808 1.958H5.423c-.998 0-1.808-.876-1.808-1.958V5.875c0-1.082.81-1.958 1.808-1.958h83.154c.998 0 1.808.876 1.808 1.958V23.5z"/></g><g id="noun_Browser_1327494" fill="#000" fill-rule="nonzero" opacity=".812" transform="translate(14 16)"><g id="Group"><path id="Shape" d="M86 .523c1.105 0 2 1.294 2 2.889V87.19c0 1.595-.895 2.889-2 2.889H2c-1.105 0-2-1.294-2-2.89V3.413C0 1.817.895.523 2 .523h84zm-2 5.778H4v11.194h80V6.301zm0 16.972H4v61.028h80V23.273z"/><path id="Shape" d="M78.75 8.106c1.515 0 2.781 1.85 2.781 4.018 0 2.167-1.235 4.017-2.781 4.017s-2.781-1.85-2.781-4.017c0-2.168 1.266-4.018 2.781-4.018zm0 2.257c-.686 0-1.219.864-1.219 1.76 0 .897.564 1.761 1.219 1.761.655 0 1.219-.864 1.219-1.76 0-.897-.533-1.76-1.219-1.76zM63.625 8.106c1.5 0 2.812 1.85 2.812 4.018 0 2.167-1.281 4.017-2.812 4.017-1.546 0-2.781-1.85-2.781-4.017 0-2.168 1.266-4.018 2.781-4.018zm0 2.257c-.651 0-1.188.864-1.188 1.76 0 .897.567 1.761 1.188 1.761.655 0 1.219-.864 1.219-1.76 0-.897-.533-1.76-1.219-1.76zM71.187 8.106c1.516 0 2.782 1.85 2.782 4.018 0 2.167-1.235 4.017-2.782 4.017-1.53 0-2.78-1.85-2.78-4.017 0-2.168 1.28-4.018 2.78-4.018zm0 2.257c-.686 0-1.218.864-1.218 1.76 0 .897.563 1.761 1.218 1.761.621 0 1.22-.864 1.22-1.76 0-.897-.569-1.76-1.22-1.76z"/></g></g><text id="javascript-engine" fill="#8A704D" font-family="OpenSans-Regular, Open Sans" font-size="14" font-weight="normal"><tspan x="26.376" y="62">javascript</tspan> <tspan x="35.447" y="81">engine</tspan></text><text id="javascript-engine" fill="#8A704D" font-family="OpenSans-Bold, Open Sans" font-size="18" font-weight="bold"><tspan x="349.225" y="59">javascript</tspan> <tspan x="363.204" y="83">engine</tspan></text><text id="javascript-engine" fill="#8A704D" font-family="OpenSans-Bold, Open Sans" font-size="14" font-weight="bold"><tspan x="199.064" y="59">javascript</tspan> <tspan x="209.937" y="78">engine</tspan></text></g></g></svg>

Before

Width:  |  Height:  |  Size: 4 KiB

View file

@ -1 +0,0 @@
console.log("It works");

View file

@ -1,5 +0,0 @@
Congratulations!
This task was simple though.
Go ahead to learn more.

View file

@ -1,11 +0,0 @@
# Hello, world!
Welcome to the tasks!
Practicing will help you to understand theory and hone your skills!
The first task is simple, just to get acquainted.
Write the code to `console.log` a message "Hello" (you actually saw the correct right in the tutorial).

View file

@ -1,7 +0,0 @@
// TODO: tests are executed after code (See evalWorker.js)
//
window.addEventListener('message', event => {
// event.name = message or log or whatever?
// check that console.log happened
console.error(event);
});

View file

@ -1,131 +0,0 @@
# Statements
Just like a human speech consists of sentences, JavaScript code consists of *statements*.
Here's an example of a statement:
```js run
console.log("Hello, world!");
```
Click the "run" icon ▷ in the right-upper corner to see how it works.
In this particular statement `console.log` is the command to show a message, and `"Hello, world!"` is the string to show. We'll learn more about commands and strings soon.
We can have as many statements as we want.
For example, let's make it two separate messages, one after the other:
```js run
console.log("Hello"); console.log("World");
```
Usually, statements are written on separate lines to make the code more readable, like this:
```js run no-beautify
console.log("Hello");
console.log("World");
```
Please note: every statement ends with a semicolon `;`.
## Semicolons..or not?
Technically, a semicolon may be unnecessary, if there's a line break between statements.
Here's the same code as above, but without semicolons:
```js run no-beautify
console.log("Hello")
console.log("World")
```
It also works, because usually JavaScript interprets a line break as an "implicit" semicolon. This language feature is called the "semicolon auto-insertion".
There are exceptions for that auto-insertion, for example:
```js run no-beautify
console.log(1 +
2);
```
This code outputs `3`, same as a single-line `console.log(1 + 2)`. Here JavaScript assumes that the line-break after `+` doesn't end the statement.
Why so? For us humans, it's intuitively obvious that if the line ends with a plus `+`, then the expression is incomplete and will be continued on the next line. JavaScript has internal grammar rules for that.
Although, these rules aren't perfect.
**There are situations where our intuition differs from JavaScript semicolon auto-insertion rules.**
That may lead to subtle errors.
To prevent them, we recommend putting semicolons between statements, even if they are separated by newlines. Most of the JavaScript codebase follows this convention.
````spoiler header="See an example of such error"
If you're curious to see a concrete example of such an error, check this code out:
```js run
console.log("Hello");
[1, 2].forEach(console.log);
```
That's some advanced code, but noo need to think about the meaning of the brackets `[]` and `forEach` yet. Well study them later.
For now just remember the result of running the code: it shows `Hello`, then `1`, then `2`.
Now lets remove one semicolon after the console.log, and see how it fails:
```js run
console.log("Hello")
[1, 2].forEach(console.log);
```
The difference compared to the code above is only one character: the semicolon at the end of the first line is gone.
If we run this code, only the first `Hello` shows, and then there's an error. There are no numbers any more!
That's because JavaScript doesn't auto-insert a semicolon before square brackets [...]. So, the code in the last example is treated as a single statement, as if there were no line break at all.
In other words, JavaScript
```js
console.log("Hello")[1, 2].forEach(console.log);
```
The code may be too advanced to understand right now, but that's all right.
All you need to do is to run the code and remember the result: it shows `1` then `2`.
Let's add an `console.log` before the code and *not* finish it with a semicolon:
```js run no-beautify
console.log("Without a semicolon after the console.log - error")
[1, 2].forEach(console.log)
```
Now if you run the code, only the first `console.log` is shown and then there's an error!
...But everything becomes fine again we add a semicolon after the `console.log`:
```js run
console.log("With a semicolon after me - all ok");
[1, 2].forEach(console.log)
```
The error in the no-semicolon variant occurs because JavaScript doesn't "auto-insert" a semicolon if a newline is followed by squares 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
console.log("There will be an error")[1, 2].forEach(console.log)
```
But such a merge in this case is just wrong, hence the error. This can happen in other situations as well.
````
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.

View file

@ -1,66 +0,0 @@
# Comments
As time goes on, scripts tend to become more complex. We can add *comments* to describe what the code does and why.
Comments can be put into any place of a script. They don't affect its execution because the engine simply ignores them.
**One-line comments start with two forward slash characters `//`. The rest of the line is a comment.**
Such comment may occupy a full line of its own or follow a statement.
Like here:
```js run
// This comment occupies a line of its own
console.log("Hello");
console.log("World"); // This comment follows the statement
```
For longer, descriptive comments that span multiple lines, we can use the `/* ... */` syntax.
**Multiline comments start with a forward slash and an asterisk <code>/&#42;</code> and end with an asterisk and a forward slash <code>&#42;/</code>.**
Like this:
```js run
/* An example with two messages.
This is a multiline comment.
*/
console.log("Hello");
console.log("World");
```
The content of comments is ignored, so if we wrap a piece of code into `/* ... */`, it won't execute.
It can be handy to temporarily disable ("comment out") a part of code:
```js run
/* Commenting out the code
console.log("Hello");
*/
console.log("World");
```
```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` and `key:Option` instead of `key:Shift`.
```
````warn header="Nested comments are not supported!"
There may not be `/*...*/` inside another `/*...*/`.
Such code will die with an error:
```js run no-beautify
/*
/* nested comment leads to an error! */
*/
console.log( "World" );
```
````
Please, don't hesitate to comment your code.
Comments increase the overall code footprint, but that's not a problem at all. There are many tools which minify code before publishing to a production server. They remove comments, so they don't appear in the working scripts. Therefore, comments do not have negative effects on production at all.

View file

@ -1,2 +0,0 @@
let admin;
let user;

View file

@ -1,4 +0,0 @@
# Working with variables
Declare two variables: `admin` and `user`.

View file

@ -1,9 +0,0 @@
describe("Test", function() {
it("declares `admin`", function() {
admin; // error if not declared
});
it("declares `user`", function() {
user; // error if not declared
});
});

View file

@ -1,4 +0,0 @@
let user;
let admin;
user = "John";

View file

@ -1 +0,0 @@
Assign the value `"John"` to `user`.

View file

@ -1,5 +0,0 @@
describe("Test", function() {
it(`user has a value: "John"`, function() {
expect(user).toEqual("John");
});
});

View file

@ -1,5 +0,0 @@
let user, admin;
user = "John";
admin = user;

View file

@ -1 +0,0 @@
Copy the value from `user` to `admin`.

View file

@ -1,6 +0,0 @@
describe("Test", function() {
it(`user and admin have value "John"`, function() {
expect(user).toEqual("John");
expect(admin).toEqual("John");
});
});

View file

@ -1,7 +0,0 @@
let user, admin;
user = "John";
admin = user;
alert(admin);

View file

@ -1 +0,0 @@
Show the value of `admin` using `alert` (will show "John").

View file

@ -1,14 +0,0 @@
let nativeAlert = globalThis.alert;
globalThis.alert = jasmine.createSpy();
describe("Test", function() {
after(function() {
globalThis.alert = this.alert;
});
it(`user and admin equal "John"`, function() {
expect(user).toEqual("John");
expect(admin).toEqual("John");
});
});

View file

@ -1,291 +0,0 @@
# Variables
Depending on our application, scripts need to store and manipulate different kinds of data.
For example:
- An online shop -- the data includes goods being sold and the shopping cart content.
- A chat application -- the data includes users, messages, etc.
A [variable](https://en.wikipedia.org/wiki/Variable_(computer_science)) is a "named storage" for data.
To create a variable in JavaScript, use the `let` keyword.
The statement below creates (in formal terms: *declares*) a variable with the name "message":
```js
let message;
```
Now we can store some data into it by using the assignment `=`:
```js
let message;
*!*
message = "Hello"; // store the string "Hello"
*/!*
```
The string is now saved into the memory area associated with the variable. We can access it using the variable name:
```js run
let message;
message = "Hello!";
*!*
console.log(message); // shows the variable content
*/!*
```
To be concise, we can combine the variable declaration and assignment into a single line:
```js run
*!*
let message = "Hello!"; // declare the variable and assign the value to it
*/!*
console.log(message); // Hello!
```
One can also declare multiple variables in one line:
```js no-beautify
let user = "John", age = 25, message = "Hello";
```
That might seem shorter, but we don't recommend it. For the sake of better readability, it's better to use a single line per variable.
The multiline variant is a bit longer, but easier to read:
```js
let user = "John";
let age = 25;
let message = "Hello";
```
## A real-life analogy
We can easily grasp the concept of a "variable" if we imagine it as a "box" for data, with a named sticker on it.
For instance, the variable `message` can be imagined as a box labeled `"message"` with the value `"Hello!"` in it:
![](variable.svg)
We can put any value in the box.
We can also change it as many times as we want:
```js run
let message;
message = "Hello!";
message = "World!"; // value changed
console.log(message);
```
When the value is changed, the old data is removed from the variable:
![](variable-change.svg)
We can also declare two variables and copy data from one into the other.
```js run
let hello = "Hello!";
let message;
*!*
// copy "Hello!" from hello into message
message = hello;
*/!*
// now two variables hold the same data
console.log(hello); // Hello!
console.log(message); // Hello!
```
Now we have two variables, both store the same string:
![](variable-copy-value.svg)
````warn header="Re-declaration triggers an error"
A variable can be declared only once.
A repeated declaration of the same variable is an error:
```js run
let message = "One";
// repeated 'let' leads to an error
let message = "Two"; // SyntaxError: 'message' has already been declared
```
So, we should declare a variable once and then refer to it without `let`.
````
## Variable naming
Technically, a variable name can be any word.
There's just a couple of limitations:
1. The name must be made of letters, digits, or symbols `$` and `_`.
2. The first character must not be a digit.
Examples of valid names:
```js
let userName;
let test123;
```
When the name contains multiple words, [camelCase](https://en.wikipedia.org/wiki/CamelCase) is commonly used. That is: words go one after another, each word after the first one starting with a capital letter: `myVeryLongName`.
What's interesting -- the dollar sign `'$'` and the underscore `'_'` can also be used in names. They are regular symbols, just like letters, without any special meaning.
These names are valid:
```js run untrusted
let $ = 1; // declared a variable with the name "$"
let _ = 2; // and now a variable with the name "_"
console.log($ + _); // 3
```
Examples of incorrect variable names:
```js no-beautify
let 1a; // cannot start with a digit
let my-name; // hyphens '-' aren't allowed in the name
```
```smart header="Case matters"
Variables named `apple` and `AppLE` are two different variables.
```
````smart header="Non-Latin letters are allowed, but not recommended"
It is possible to use any language, including cyrillic letters or even hieroglyphs, like this:
```js
let имя = '...';
let 我 = '...';
```
Technically, there is no error here. Such names are allowed, but there is an international convention to use English in variable names. Even if you're writing a small script, it may have a long life ahead. People from other countries may need to read it in the future.
````
````warn header="Reserved names"
There is a [list of reserved words](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Keywords), which cannot be used as variable names because they are used by the language itself.
For example: `let`, `class`, `return`, and `function` are reserved.
The code below gives a syntax error:
```js run no-beautify
let let = 5; // can't name a variable "let", error!
let return = 5; // also can't name it "return", error!
```
````
## Constants
There are information pieces that aren't expected to change.
For example, a date of birth is a fixed point of time.
To declare a variable that isn't expected to change, use `const` instead of `let`:
```js
const myBirthdate = '18.04.1982';
```
Variables declared using `const` are called "constants". They cannot be reassigned. An attempt to do so would cause an error:
```js run
const myBirthdate = '18.04.1982';
myBirthdate = '01.01.2001'; // error, can't reassign the constant!
```
Here's why using `const` for such variables is a good thing.
1. It gives a hint to every person who reads the code, that the value isn't going to change. So that they can safely eye-jump while reading the code and assume it's still the same.
2. It insures against programming mistakes: if we (or another person who supports our code) attempt to change it, there'll be an error.
## Uppercase constants
There is a widespread practice to use constants as aliases for difficult-to-remember values that are known prior to execution.
Such constants are named using capital letters and underscores.
For instance, let's make constants for hexadecimal color codes (these codes are used in web programming and other areas):
```js run
const COLOR_RED = "#F00";
const COLOR_GREEN = "#0F0";
const COLOR_BLUE = "#00F";
const COLOR_ORANGE = "#FF7F00";
// ...when we need to pick a color:
let color = COLOR_ORANGE; // (instead of the hexadecimal code)
console.log(color); // #FF7F00
```
Benefits:
- `COLOR_ORANGE` is much easier to remember than `"#FF7F00"`.
- It is much easier to mistype `"#FF7F00"` than `COLOR_ORANGE`, so it's also more reliable.
- When reading the code, `COLOR_ORANGE` is much more meaningful than `#FF7F00`.
When should we use capitals for a constant and when should we name it normally? Let's make that clear.
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 the orange color) and there are constants that are *calculated* in run-time, during the execution, but do not change after their initial assignment.
For instance:
```js
const currentDate = /* assign the current date here */;
```
The value of `currentDate` is a constant because it doesn't change after assignment, but it may differ from day to day. So it's lowercased.
In other words, capital-named constants are only used as aliases for "hard-coded" values, known prior to execution.
## Name things right
Talking about variables, there's one more extremely important thing.
A variable name should have a clean, obvious meaning, describing the data that it stores.
Variable naming is one of the most important and complex skills in programming. A quick glance at variable names can reveal which code was written by a beginner versus an experienced developer.
In a real project, most of the time is spent modifying and extending an existing code base rather than writing something completely new from scratch. When we look at someone else's code, and even if we return to our code after a while, it's much easier to find information that is well-labeled. Or, in other words, when the variables have good names.
Please spend time thinking about the right name for a variable before declaring it. Doing so will repay you handsomely.
Some good-to-follow rules are:
- Use human-readable names like `userName` or `shoppingCart`.
- Stay away from abbreviations or short names like `a`, `b`, `c`, unless you really know what you're doing.
- Make names maximally descriptive and concise. Examples of bad names are `data` and `value`. Such names say nothing. It's only okay to use them if the context of the code makes it exceptionally obvious which data or value the variable is referencing.
- Agree on terms within your team and in your own mind. If a site visitor is called a "user" then we should name related variables `currentUser` or `newUser` instead of `currentVisitor` or `newManInTown`.
Sounds simple? Indeed it is, but creating descriptive and concise variable names in practice is not. Go for it.
```smart header="Create, don't reuse"
And the last note. There are some lazy programmers who, instead of declaring new variables, tend to reuse existing ones, write new values into them.
As a result, their variables are like boxes into which people throw different things without changing their stickers. What's inside the box now? Who knows? We need to come closer and check.
Such programmers save a little bit when writing code, but lose ten times more when reading it.
An extra variable is good, not evil.
Modern JavaScript tools and browsers optimize code well enough, so it won't create performance issues. Using different variables for different values can even help the engine optimize your code.
```

View file

@ -1 +0,0 @@
<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="v2" 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>

Before

Width:  |  Height:  |  Size: 3.6 KiB

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="359" height="143" viewBox="0 0 359 143"><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="v2" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="variable-copy-value.svg"><g id="noun_1211_cc-+-Message" transform="translate(11 6)"><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 38.202 38.946)"><tspan x="2.822" y="43.482">&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 id="Group" transform="translate(210 6)"><path id="Shape" fill="#E8C48F" d="M17 37.196h113.417v42.95c0 .373-.08.862-.28 1.294-.202.433-16.702 35.56-16.702 35.56V62.64l16.983-25.444L149 9H35.582L17 37.196z"/><path id="Shape" fill="#E8C48F" d="M18 66V38L2 66"/><g id="Rectangle-5-+-&quot;World!&quot;" transform="translate(15)"><path id="Rectangle-5" fill="#FFF9EB" stroke="#8A704D" stroke-width="2" d="M19.117 1.8l-17.1 15.734 53.866 56.994 17.1-15.734L19.118 1.799z"/><text id="&quot;Hello!&quot;" fill="#8A704D" font-family="OpenSans-Bold, Open Sans" font-size="14" font-weight="bold" transform="rotate(47 38.162 37.693)"><tspan x="2.782" y="42.23">&quot;Hello!&quot;</tspan></text></g><path id="Shape" fill="#E8C48F" d="M0 68v54.73c0 3.42 1.497 5.27 4.427 5.27h100.996c3.15 0 5.577-2.548 5.577-3.476V68H0z"/><text id="hello" fill="#FFF" font-family="OpenSans-Bold, Open Sans" font-size="18" font-weight="bold"><tspan x="25" y="105">hello</tspan></text></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -1 +0,0 @@
<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="v2" 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>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -1,73 +0,0 @@
# Strict mode
JavaScript appeared in 1995 as a simple, browser-only language. Then, for a long time, it evolved without compatibility issues. New features were added to the language while old functionality didn't change.
That had the benefit of never breaking existing code. But the downside was that any mistake or an imperfect decision made by JavaScript creators got stuck in the language forever.
This was the case until 2009, when the 5th version of the standard appeared. It added new features to the language and modified some of the existing ones. Also made some syntax more strict.
Now the important part about it.
**To avoid breaking the old code, the newer modifications and restrictions are off by default.**
The good thing is: there aren't many such modifications. Also, newly introduced language features do work. The disabled things are only those that were *changed* in the language in a way that may break the code written before them.
For example, in dark old times JavaScript allowed variables to be assigned without a declaration.
Like this:
```js no-strict
*!*
user = "John";
*/!*
console.log(user); // John
```
As we can see, it should be `let user`. But JavaScript was forgiving.
This feature of the language was frowned upon, because it made code more error-prone.
Imagine, if you have a variable named `user`, and then mistype, e.g. assign to `usr` instead:
```js no-strict
let user;
usr = "John"; // mistype!
// (technically, not an error, a new variable usr is created)
```
After 2009, the language started to protect against such mistypes by requiring all variables to be declared and triggering an error otherwise.
Although, as there were many old scripts, to keep them functioning, this change, along with others, is off by default.
## Use strict
To enable all the modern changes, we need to start a script with a special directive: `"use strict"`.
Like this:
```js
"use strict";
console.log("This script works in the strict mode");
```
Please note: the directive must be at the very top, only comments are allowed above it.
With `"use strict"`, a mistype in the variable name causes an error:
```js no-strict
"use strict";
let user;
usr = "John"; // Error
```
In the future, when we learn some advanced language features (such as classes and modules), you'll see that they enable strict mode automatically. Until then, it's a good rule to start scripts with `"use strict"`.
**Here, in the tutorial, we'll always use strict mode, unless explicitly stated otherwise.**
We're studying modern JavaScript after all. But you'll also see notes about how things work without `use strict`, so that you're aware, just in case you forget to put that directive or meet a script without it.

View file

@ -0,0 +1,122 @@
# An Introduction to JavaScript
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?
*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.
Scripts are provided and executed as plain text. They don't need special preparation or compilation to run.
In this aspect, JavaScript is very different from another language called [Java](https://en.wikipedia.org/wiki/Java_(programming_language)).
```smart header="Why is it called <u>Java</u>Script?"
When JavaScript was created, it initially had another name: "LiveScript". But Java was very popular at that time, so it was decided that positioning a new language as a "younger brother" of Java would help.
But as it evolved, JavaScript became a fully independent language with its own specification called [ECMAScript](http://en.wikipedia.org/wiki/ECMAScript), and now it has no relation to Java at all.
```
Today, JavaScript can execute not only in the browser, but also on the server, or actually on any device that has a special program called [the JavaScript engine](https://en.wikipedia.org/wiki/JavaScript_engine).
The browser has an embedded engine sometimes called a "JavaScript virtual machine".
Different engines have different "codenames". For example:
- [V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)) -- in Chrome, Opera and Edge.
- [SpiderMonkey](https://en.wikipedia.org/wiki/SpiderMonkey) -- in Firefox.
- ...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, Opera and Edge.
```smart header="How do engines work?"
Engines are complicated. But the basics are easy.
1. The engine (embedded if it's a browser) reads ("parses") the script.
2. Then it converts ("compiles") the script to machine code.
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.
```
## What can in-browser JavaScript do?
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.
In-browser JavaScript can do everything related to webpage manipulation, interaction with the user, and the webserver.
For instance, in-browser JavaScript is able to:
- Add new HTML to the page, change the existing content, modify styles.
- React to user actions, run on mouse clicks, pointer movements, key presses.
- Send requests over the network to remote servers, download and upload files (so-called [AJAX](https://en.wikipedia.org/wiki/Ajax_(programming)) and [COMET](https://en.wikipedia.org/wiki/Comet_(programming)) technologies).
- Get and set cookies, ask questions to the visitor, show messages.
- Remember the data on the client-side ("local storage").
## What CAN'T in-browser JavaScript do?
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:
- 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.
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 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 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`, 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.
![](limitations.svg)
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?
There are at least *three* great things about JavaScript:
```compare
+ Full integration with HTML/CSS.
+ Simple things are done simply.
+ Supported by all major browsers and enabled by default.
```
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 said, JavaScript can be used to create servers, mobile applications, etc.
## Languages "over" JavaScript
The syntax of JavaScript does not suit everyone's needs. Different people want different features.
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.
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:
- [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](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](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.
- [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 these transpiled languages, we should also know JavaScript to really understand what we're doing.
## Summary
- 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, 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.

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -0,0 +1,37 @@
# 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 resources.
## Specification
[The ECMA-262 specification](https://www.ecma-international.org/publications/standards/Ecma-262.htm) contains the most in-depth, detailed and formalized information about JavaScript. It defines the language.
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. 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>.
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
- **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.
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 the `parseInt` function.
## Compatibility tables
JavaScript is a developing language, new features get added regularly.
To see their support among browser-based and other engines, see:
- <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.
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.

View file

@ -0,0 +1,44 @@
# Code editors
A code editor is the place where programmers spend most of their time.
There are two main types of code editors: IDEs and lightweight editors. Many people use one tool of each type.
## IDE
The term [IDE](https://en.wikipedia.org/wiki/Integrated_development_environment) (Integrated Development Environment) refers to a powerful editor with many features that usually operates on a "whole project." As the name suggests, it's not just an editor, but a full-scale "development environment."
An IDE loads the project (which can be many files), allows navigation between files, provides autocompletion based on the whole project (not just the open file), and integrates with a version management system (like [git](https://git-scm.com/)), a testing environment, and other "project-level" stuff.
If you haven't selected an IDE yet, consider the following options:
- [Visual Studio Code](https://code.visualstudio.com/) (cross-platform, free).
- [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/).
Many IDEs are paid, but have a trial period. Their cost is usually negligible compared to a qualified developer's salary, so just choose the best one for you.
## Lightweight editors
"Lightweight editors" are not as powerful as IDEs, but they're fast, elegant and simple.
They are mainly used to open and edit a file instantly.
The main difference between a "lightweight editor" and an "IDE" is that an IDE works on a project-level, so it loads much more data on start, analyzes the project structure if needed and so on. A lightweight editor is much faster if we need only one file.
In practice, lightweight editors may have a lot of plugins including directory-level syntax analyzers and autocompleters, so there's no strict border between a lightweight editor and an IDE.
The following options deserve your attention:
- [Sublime Text](http://www.sublimetext.com) (cross-platform, shareware).
- [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.
## Let's not argue
The editors in the lists above are those that either I or my friends whom I consider good developers have been using for a long time and are happy with.
There are other great editors in our big world. Please choose the one you like the most.
The choice of an editor, like any other tool, is individual and depends on your projects, habits, and personal preferences.

View file

@ -0,0 +1,63 @@
# Developer console
Code is prone to errors. You will quite likely make errors... Oh, what am I talking about? You are *absolutely* going to make errors, at least if you're a human, not a [robot](https://en.wikipedia.org/wiki/Bender_(Futurama)).
But in the browser, users don't see errors by default. So, if something goes wrong in the script, we won't see what's broken and can't fix it.
To see errors and get a lot of other useful information about scripts, "developer tools" have been embedded in browsers.
Most developers lean towards Chrome or Firefox for development because those browsers have the best developer tools. Other browsers also provide developer tools, sometimes with special features, but are usually playing "catch-up" to Chrome or Firefox. So most developers have a "favorite" browser and switch to others if a problem is browser-specific.
Developer tools are potent; they have many features. To start, we'll learn how to open them, look at errors, and run JavaScript commands.
## Google Chrome
Open the page [bug.html](bug.html).
There's an error in the JavaScript code on it. It's hidden from a regular visitor's eyes, so let's open developer tools to see it.
Press `key:F12` or, if you're on Mac, then `key:Cmd+Opt+J`.
The developer tools will open on the Console tab by default.
It looks somewhat like this:
![chrome](chrome.png)
The exact look of developer tools depends on your version of Chrome. It changes from time to time but should be similar.
- Here we can see the red-colored error message. In this case, the script contains an unknown "lalala" command.
- On the right, there is a clickable link to the source `bug.html:12` with the line number where the error has occurred.
Below the error message, there is a blue `>` symbol. It marks a "command line" where we can type JavaScript commands. Press `key:Enter` to run them.
Now we can see errors, and that's enough for a start. We'll come back to developer tools later and cover debugging more in-depth in the chapter <info:debugging-chrome>.
```smart header="Multi-line input"
Usually, when we put a line of code into the console, and then press `key:Enter`, it executes.
To insert multiple lines, press `key:Shift+Enter`. This way one can enter long fragments of JavaScript code.
```
## Firefox, Edge, and others
Most other browsers use `key:F12` to open developer tools.
The look & feel of them is quite similar. Once you know how to use one of these tools (you can start with Chrome), you can easily switch to another.
## Safari
Safari (Mac browser, not supported by Windows/Linux) is a little bit special here. We need to enable the "Develop menu" first.
Open Preferences and go to the "Advanced" pane. There's a checkbox at the bottom:
![safari](safari.png)
Now `key:Cmd+Opt+C` can toggle the console. Also, note that the new top menu item named "Develop" has appeared. It has many commands and options.
## Summary
- Developer tools allow us to see errors, run commands, examine variables, and much more.
- They can be opened with `key:F12` for most browsers on Windows. Chrome for Mac needs `key:Cmd+Opt+J`, Safari: `key:Cmd+Opt+C` (need to enable first).
Now we have the environment ready. In the next section, we'll get down to JavaScript.

View file

@ -0,0 +1,17 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
There is an error in the script on this page.
<script>
lalala
</script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

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

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

View file

@ -0,0 +1,12 @@
importance: 5
---
# Show an alert
Create a page that shows a message "I'm JavaScript!".
Do it in a sandbox, or on your hard drive, doesn't matter, just ensure that it works.
[demo src="solution"]

View file

@ -0,0 +1 @@
alert("I'm JavaScript!");

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<body>
<script src="alert.js"></script>
</body>
</html>

View file

@ -0,0 +1,8 @@
The HTML code:
[html src="index.html"]
For the file `alert.js` in the same folder:
[js src="alert.js"]

View file

@ -0,0 +1,9 @@
importance: 5
---
# Show an alert with an external script
Take the solution of the previous task <info:task/hello-alert>. Modify it by extracting the script content into an external file `alert.js`, residing in the same folder.
Open the page, ensure that the alert works.

View file

@ -0,0 +1,132 @@
# Hello, world!
This part of the tutorial is about core JavaScript, the language itself.
But we need a working environment to run our scripts and, since this book is online, the browser is a good choice. We'll keep the amount of browser-specific commands (like `alert`) to a minimum so that you don't spend time on them if you plan to concentrate on another environment (like Node.js). We'll focus on JavaScript in the browser in the [next part](/ui) of the tutorial.
So first, let's see how we attach a script to a webpage. For server-side environments (like Node.js), you can execute the script with a command like `"node my.js"`.
## The "script" tag
JavaScript programs can be inserted almost anywhere into an HTML document using the `<script>` tag.
For instance:
```html run height=100
<!DOCTYPE HTML>
<html>
<body>
<p>Before the script...</p>
*!*
<script>
alert( 'Hello, world!' );
</script>
*/!*
<p>...After the script.</p>
</body>
</html>
```
```online
You can run the example by clicking the "Play" button in the right-top corner of the box above.
```
The `<script>` tag contains JavaScript code which is automatically executed when the browser processes the tag.
## Modern markup
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 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>
: 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.
Comments before and after scripts.
: In really ancient books and guides, you may find comments inside `<script>` tags, like this:
```html no-beautify
<script type="text/javascript"><!--
...
//--></script>
```
This trick isn't used in modern JavaScript. These comments hide JavaScript code from old browsers that didn't know how to process the `<script>` tag. Since browsers released in the last 15 years don't have this issue, this kind of comment can help you identify really old code.
## External scripts
If we have a lot of JavaScript code, we can put it into a separate file.
Script files are attached to HTML with the `src` attribute:
```html
<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"`, 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:
```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js"></script>
```
To attach several scripts, use multiple tags:
```html
<script src="/js/script1.js"></script>
<script src="/js/script2.js"></script>
```
```smart
As a rule, only the simplest scripts are put into HTML. More complex ones reside in separate files.
The benefit of a separate file is that the browser will download it and store it in its [cache](https://en.wikipedia.org/wiki/Web_cache).
Other pages that reference the same script will take it from the cache instead of downloading it, so the file is actually downloaded only once.
That reduces traffic and makes pages faster.
```
````warn header="If `src` is set, the script content is ignored."
A single `<script>` tag can't have both the `src` attribute and code inside.
This won't work:
```html
<script *!*src*/!*="file.js">
alert(1); // the content is ignored, because src is set
</script>
```
We must choose either an external `<script src="…">` or a regular `<script>` with code.
The example above can be split into two scripts to work:
```html
<script src="file.js"></script>
<script>
alert(1);
</script>
```
````
## Summary
- We can use a `<script>` tag to add JavaScript code to a page.
- The `type` and `language` attributes are not required.
- A script in an external file can be inserted with `<script src="path/to/script.js"></script>`.
There is much more to learn about browser scripts and their interaction with the webpage. But let's keep in mind that this part of the tutorial is devoted to the JavaScript language, so we shouldn't distract ourselves with browser-specific implementations of it. We'll be using the browser as a way to run JavaScript, which is very convenient for online reading, but only one of many.

View file

@ -0,0 +1,155 @@
# Code structure
The first thing we'll study is the building blocks of code.
## Statements
Statements are syntax constructs and commands that perform actions.
We've already seen a statement, `alert('Hello, world!')`, which shows the message "Hello, world!".
We can have as many statements in our code as we want. Statements can be separated with a semicolon.
For example, here we split "Hello World" into two alerts:
```js run no-beautify
alert('Hello'); alert('World');
```
Usually, statements are written on separate lines to make the code more readable:
```js run no-beautify
alert('Hello');
alert('World');
```
## Semicolons [#semicolon]
A semicolon may be omitted in most cases when a line break exists.
This would also work:
```js run no-beautify
alert('Hello')
alert('World')
```
Here, JavaScript interprets the line break as an "implicit" semicolon. This is called an [automatic semicolon insertion](https://tc39.github.io/ecma262/#sec-automatic-semicolon-insertion).
**In most cases, a newline implies a semicolon. But "in most cases" does not mean "always"!**
There are cases when a newline does not mean a semicolon. For example:
```js run no-beautify
alert(3 +
1
+ 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 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.**
Errors which occur in such cases are quite hard to find and fix.
````smart header="An example of an error"
If you're curious to see a concrete example of such an error, check this code out:
```js run
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 running the code: it shows `Hello`, then `1`, then `2`.
Now let's remove the semicolon after the `alert`:
```js run no-beautify
alert("Hello")
[1, 2].forEach(alert);
```
The difference compared to the code above is only one character: the semicolon at the end of the first line is gone.
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.
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.
Here's how the engine sees it:
```js run no-beautify
alert("Hello")[1, 2].forEach(alert);
```
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.
## 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.
Comments can be put into any place of a script. They don't affect its execution because the engine simply ignores them.
**One-line comments start with two forward slash characters `//`.**
The rest of the line is a comment. It may occupy a full line of its own or follow a statement.
Like here:
```js run
// This comment occupies a line of its own
alert('Hello');
alert('World'); // This comment follows the statement
```
**Multiline comments start with a forward slash and an asterisk <code>/&#42;</code> and end with an asterisk and a forward slash <code>&#42;/</code>.**
Like this:
```js run
/* An example with two messages.
This is a multiline comment.
*/
alert('Hello');
alert('World');
```
The content of comments is ignored, so if we put code inside <code>/&#42; ... &#42;/</code>, it won't execute.
Sometimes it can be handy to temporarily disable a part of code:
```js run
/* Commenting out the code
alert('Hello');
*/
alert('World');
```
```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` and `key:Option` instead of `key:Shift`.
```
````warn header="Nested comments are not supported!"
There may not be `/*...*/` inside another `/*...*/`.
Such code will die with an error:
```js run no-beautify
/*
/* nested comment ?!? */
*/
alert( 'World' );
```
````
Please, don't hesitate to comment your code.
Comments increase the overall code footprint, but that's not a problem at all. There are many tools which minify code before publishing to a production server. They remove comments, so they don't appear in the working scripts. Therefore, comments do not have negative effects on production at all.
Later in the tutorial there will be a chapter <info:code-quality> that also explains how to write better comments.

View file

@ -0,0 +1,89 @@
# The modern mode, "use strict"
For a long time, JavaScript evolved without compatibility issues. New features were added to the language while old functionality didn't change.
That had the benefit of never breaking existing code. But the downside was that any mistake or an imperfect decision made by JavaScript's creators got stuck in the language forever.
This was the case until 2009 when ECMAScript 5 (ES5) appeared. It added new features to the language and modified some of the existing ones. To keep the old code working, most such modifications are off by default. You need to explicitly enable them with a special directive: `"use strict"`.
## "use strict"
The directive looks like a string: `"use strict"` or `'use strict'`. When it is located at the top of a script, the whole script works the "modern" way.
For example:
```js
"use strict";
// this code works the modern way
...
```
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"
Please make sure that `"use strict"` is at the top of your scripts, otherwise strict mode may not be enabled.
Strict mode isn't enabled here:
```js no-strict
alert("some code");
// "use strict" below is ignored--it must be at the top
"use strict";
// strict mode is not activated
```
Only comments may appear above `"use strict"`.
````
```warn header="There's no way to cancel `use strict`"
There is no directive like `"no use strict"` that reverts the engine to old behavior.
Once we enter strict mode, there's no going back.
```
## Browser console
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.
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
'use strict'; <Shift+Enter for a newline>
// ...your code
<Enter to run>
```
It works in most browsers, namely Firefox and Chrome.
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
(function() {
'use strict';
// ...your code here...
})()
```
## Should we "use strict"?
The question may sound obvious, but it's not so.
One could recommend to start scripts with `"use strict"`... But you know what's cool?
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.
**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.**
As of now, we've got to know about `use strict` in general.
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

@ -0,0 +1,12 @@
In the code below, each line corresponds to the item in the task list.
```js run
let admin, name; // can declare two variables at once
name = "John";
admin = name;
alert( admin ); // "John"
```

View file

@ -0,0 +1,10 @@
importance: 2
---
# Working with variables
1. Declare two variables: `admin` and `name`.
2. Assign the value `"John"` to `name`.
3. Copy the value from `name` to `admin`.
4. Show the value of `admin` using `alert` (must output "John").

View file

@ -0,0 +1,21 @@
## The variable for our planet
That's simple:
```js
let ourPlanetName = "Earth";
```
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
```js
let currentUserName = "John";
```
Again, we could shorten that to `userName` if we know for sure that the user is current.
Modern editors and autocomplete make long variable names easy to write. Don't save on them. A name with 3 words in it is fine.
And if your editor does not have proper autocompletion, get [a new one](/code-editors).

View file

@ -0,0 +1,8 @@
importance: 3
---
# Giving the right name
1. Create a variable with the name of our planet. How would you name such a variable?
2. Create a variable to store the name of a current visitor to a website. How would you name that variable?

View file

@ -0,0 +1,5 @@
We generally use upper case for constants that are "hard-coded". Or, in other words, when the value is known prior to execution and directly written into the code.
In this code, `birthday` is exactly like that. So we could use the upper case for it.
In contrast, `age` is evaluated in run-time. Today we have one age, a year after we'll have another one. It is constant in a sense that it does not change through the code execution. But it is a bit "less of a constant" than `birthday`: it is calculated, so we should keep the lower case for it.

View file

@ -0,0 +1,25 @@
importance: 4
---
# Uppercase const?
Examine the following code:
```js
const birthday = '18.04.1982';
const age = someCode(birthday);
```
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?
```js
const BIRTHDAY = '18.04.1982'; // make birthday uppercase?
const AGE = someCode(BIRTHDAY); // make age uppercase?
```

View file

@ -0,0 +1,345 @@
# Variables
Most of the time, a JavaScript application needs to work with information. Here are two examples:
1. An online shop -- the information might include goods being sold and a shopping cart.
2. A chat application -- the information might include users, messages, and much more.
Variables are used to store this information.
## A variable
A [variable](https://en.wikipedia.org/wiki/Variable_(computer_science)) is a "named storage" for data. We can use variables to store goodies, visitors, and other data.
To create a variable in JavaScript, use the `let` keyword.
The statement below creates (in other words: *declares*) a variable with the name "message":
```js
let message;
```
Now, we can put some data into it by using the assignment operator `=`:
```js
let message;
*!*
message = 'Hello'; // store the string 'Hello' in the variable named message
*/!*
```
The string is now saved into the memory area associated with the variable. We can access it using the variable name:
```js run
let message;
message = 'Hello!';
*!*
alert(message); // shows the variable content
*/!*
```
To be concise, we can combine the variable declaration and assignment into a single line:
```js run
let message = 'Hello!'; // define the variable and assign the value
alert(message); // Hello!
```
We can also declare multiple variables in one line:
```js no-beautify
let user = 'John', age = 25, message = 'Hello';
```
That might seem shorter, but we don't recommend it. For the sake of better readability, please use a single line per variable.
The multiline variant is a bit longer, but easier to read:
```js
let user = 'John';
let age = 25;
let message = 'Hello';
```
Some people also define multiple variables in this multiline style:
```js no-beautify
let user = 'John',
age = 25,
message = 'Hello';
```
...Or even in the "comma-first" style:
```js no-beautify
let user = 'John'
, age = 25
, message = 'Hello';
```
Technically, all these variants do the same thing. So, it's a matter of personal taste and aesthetics.
````smart header="`var` instead of `let`"
In older scripts, you may also find another keyword: `var` instead of `let`:
```js
*!*var*/!* message = 'Hello';
```
The `var` keyword is *almost* the same as `let`. It also declares a variable, but in a slightly different, "old-school" way.
There are subtle differences between `let` and `var`, but they do not matter for us yet. We'll cover them in detail in the chapter <info:var>.
````
## A real-life analogy
We can easily grasp the concept of a "variable" if we imagine it as a "box" for data, with a uniquely-named sticker on it.
For instance, the variable `message` can be imagined as a box labeled `"message"` with the value `"Hello!"` in it:
![](variable.svg)
We can put any value in the box.
We can also change it as many times as we want:
```js run
let message;
message = 'Hello!';
message = 'World!'; // value changed
alert(message);
```
When the value is changed, the old data is removed from the variable:
![](variable-change.svg)
We can also declare two variables and copy data from one into the other.
```js run
let hello = 'Hello world!';
let message;
*!*
// copy 'Hello world' from hello into message
message = hello;
*/!*
// now two variables hold the same data
alert(hello); // 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"
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.
In such languages, once the value is stored "in the box", it's there forever. If we need to store something else, the language forces us to create a new box (declare a new variable). We can't reuse the old one.
Though it may seem a little odd at first sight, these languages are quite capable of serious development. More than that, there are areas like parallel computations where this limitation confers certain benefits. Studying such a language (even if you're not planning to use it soon) is recommended to broaden the mind.
```
## Variable naming [#variable-naming]
There are two limitations on variable names in JavaScript:
1. The name must contain only letters, digits, or the symbols `$` and `_`.
2. The first character must not be a digit.
Examples of valid names:
```js
let userName;
let test123;
```
When the name contains multiple words, [camelCase](https://en.wikipedia.org/wiki/CamelCase) is commonly used. That is: words go one after another, each word except first starting with a capital letter: `myVeryLongName`.
What's interesting -- the dollar sign `'$'` and the underscore `'_'` can also be used in names. They are regular symbols, just like letters, without any special meaning.
These names are valid:
```js run untrusted
let $ = 1; // declared a variable with the name "$"
let _ = 2; // and now a variable with the name "_"
alert($ + _); // 3
```
Examples of incorrect variable names:
```js no-beautify
let 1a; // cannot start with a digit
let my-name; // hyphens '-' aren't allowed in the name
```
```smart header="Case matters"
Variables named `apple` and `APPLE` are two different variables.
```
````smart header="Non-Latin letters are allowed, but not recommended"
It is possible to use any language, including cyrillic letters or even hieroglyphs, like this:
```js
let имя = '...';
let 我 = '...';
```
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"
There is a [list of reserved words](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Keywords), which cannot be used as variable names because they are used by the language itself.
For example: `let`, `class`, `return`, and `function` are reserved.
The code below gives a syntax error:
```js run no-beautify
let let = 5; // can't name a variable "let", error!
let return = 5; // also can't name it "return", error!
```
````
````warn header="An assignment without `use strict`"
Normally, we need to define a variable before using it. But in the old times, it was technically possible to create a variable by a mere assignment of the value without using `let`. This still works now if we don't put `use strict` in our scripts to maintain compatibility with old scripts.
```js run no-strict
// note: no "use strict" in this example
num = 5; // the variable "num" is created if it didn't exist
alert(num); // 5
```
This is a bad practice and would cause an error in strict mode:
```js
"use strict";
*!*
num = 5; // error: num is not defined
*/!*
```
````
## Constants
To declare a constant (unchanging) variable, use `const` instead of `let`:
```js
const myBirthday = '18.04.1982';
```
Variables declared using `const` are called "constants". They cannot be reassigned. An attempt to do so would cause an error:
```js run
const myBirthday = '18.04.1982';
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.
### Uppercase constants
There is a widespread practice to use constants as aliases for difficult-to-remember values that are known prior to execution.
Such constants are named using capital letters and underscores.
For instance, let's make constants for colors in so-called "web" (hexadecimal) format:
```js run
const COLOR_RED = "#F00";
const COLOR_GREEN = "#0F0";
const COLOR_BLUE = "#00F";
const COLOR_ORANGE = "#FF7F00";
// ...when we need to pick a color
let color = COLOR_ORANGE;
alert(color); // #FF7F00
```
Benefits:
- `COLOR_ORANGE` is much easier to remember than `"#FF7F00"`.
- It is much easier to mistype `"#FF7F00"` than `COLOR_ORANGE`.
- When reading the code, `COLOR_ORANGE` is much more meaningful than `#FF7F00`.
When should we use capitals for a constant and when should we name it normally? Let's make that clear.
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:
```js
const pageLoadTime = /* time taken by a webpage to load */;
```
The value of `pageLoadTime` is not known prior to the page load, so it's named normally. But it's still a constant because it doesn't change after assignment.
In other words, capital-named constants are only used as aliases for "hard-coded" values.
## Name things right
Talking about variables, there's one more extremely important thing.
A variable name should have a clean, obvious meaning, describing the data that it stores.
Variable naming is one of the most important and complex skills in programming. A quick glance at variable names can reveal which code was written by a beginner versus an experienced developer.
In a real project, most of the time is spent modifying and extending an existing code base rather than writing something completely separate from scratch. When we return to some code after doing something else for a while, it's much easier to find information that is well-labeled. Or, in other words, when the variables have good names.
Please spend time thinking about the right name for a variable before declaring it. Doing so will repay you handsomely.
Some good-to-follow rules are:
- Use human-readable names like `userName` or `shoppingCart`.
- Stay away from abbreviations or short names like `a`, `b`, `c`, unless you really know what you're doing.
- Make names maximally descriptive and concise. Examples of bad names are `data` and `value`. Such names say nothing. It's only okay to use them if the context of the code makes it exceptionally obvious which data or value the variable is referencing.
- Agree on terms within your team and in your own mind. If a site visitor is called a "user" then we should name related variables `currentUser` or `newUser` instead of `currentVisitor` or `newManInTown`.
Sounds simple? Indeed it is, but creating descriptive and concise variable names in practice is not. Go for it.
```smart header="Reuse or create?"
And the last note. There are some lazy programmers who, instead of declaring new variables, tend to reuse existing ones.
As a result, their variables are like boxes into which people throw different things without changing their stickers. What's inside the box now? Who knows? We need to come closer and check.
Such programmers save a little bit on variable declaration but lose ten times more on debugging.
An extra variable is good, not evil.
Modern JavaScript minifiers and browsers optimize code well enough, so it won't create performance issues. Using different variables for different values can even help the engine optimize your code.
```
## Summary
We can declare variables to store data by using the `var`, `let`, or `const` keywords.
- `let` -- is a modern variable declaration.
- `var` -- is an old-school variable declaration. Normally we don't use it at all, but we'll cover subtle differences from `let` in the chapter <info:var>, just in case you need them.
- `const` -- is like `let`, but the value of the variable can't be changed.
Variables should be named in a way that allows us to easily understand what's inside them.

View file

@ -0,0 +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.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>

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

@ -0,0 +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="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>

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -46,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
```
`NaN` is sticky. Any further operation on `NaN` returns `NaN`:
`NaN` is sticky. Any further mathematical operation on `NaN` returns `NaN`:
```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"
Doing maths is "safe" in JavaScript. We can do anything: divide by zero, treat non-numeric strings as numbers, etc.
@ -64,11 +66,22 @@ 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>.
## BigInt
## BigInt [#bigint-type]
In JavaScript, the "number" type cannot 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. It's a technical limitation caused by their internal representation.
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.
For most purposes that's quite enough, but sometimes we need really big numbers, e.g. for cryptography or microsecond-precision timestamps.
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.
@ -213,14 +226,7 @@ The `symbol` type is used to create unique identifiers for objects. We have to m
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:
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:
A call to `typeof x` returns a string with the type name:
```js
typeof undefined // "undefined"
@ -251,25 +257,37 @@ typeof alert // "function" (3)
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.
2. The result of `typeof null` is `"object"`. That's an officially recognized error in `typeof` behavior, coming from the 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.
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 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
There are 8 basic data types in JavaScript.
- `number` for numbers of any kind: integer or floating-point, integers are limited by <code>±(2<sup>53</sup>-1)</code>.
- `bigint` is for integer numbers of arbitrary length.
- `string` for strings. A string may have zero or more characters, there's no separate single-character type.
- `boolean` for `true`/`false`.
- `null` for unknown values -- a standalone type that has a single value `null`.
- `undefined` for unassigned values -- a standalone type that has a single value `undefined`.
- `object` for more complex data structures.
- `symbol` for unique identifiers.
- Seven primitive data types:
- `number` for numbers of any kind: integer or floating-point, integers are limited by <code>±(2<sup>53</sup>-1)</code>.
- `bigint` for integer numbers of arbitrary length.
- `string` for strings. A string may have zero or more characters, there's no separate single-character type.
- `boolean` for `true`/`false`.
- `null` for unknown values -- a standalone type that has a single value `null`.
- `undefined` for unassigned values -- a standalone type that has a single value `undefined`.
- `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.
- 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"`.
- For `null` returns `"object"` -- this is an error in the language, it's not actually an object.

View file

@ -7,7 +7,7 @@ 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.
```smart header="Not talking about objects yet"
In this chapter, we won't cover objects. For now we'll just be talking about primitives.
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.
```
@ -70,7 +70,7 @@ Numeric conversion rules:
|`undefined`|`NaN`|
|`null`|`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:
@ -130,7 +130,7 @@ The conversion follows the rules:
|`undefined`|`NaN`|
|`null`|`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)`.

View file

@ -9,7 +9,6 @@ true + false = 1
"$" + 4 + 5 = "$45"
"4" - 2 = 2
"4px" - 2 = NaN
7 / 0 = Infinity
" -9 " + 5 = " -9 5" // (3)
" -9 " - 5 = -14 // (4)
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).
5. `null` becomes `0` 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" - 2
"4px" - 2
7 / 0
" -9 " + 5
" -9 " - 5
null + 1

View file

@ -56,17 +56,21 @@ alert( 8 % 3 ); // 2, a remainder of 8 divided by 3
### Exponentiation **
The exponentiation operator `a ** b` multiplies `a` by itself `b` times.
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 ); // 4 (2 multiplied by itself 2 times)
alert( 2 ** 3 ); // 8 (2 * 2 * 2, 3 times)
alert( 2 ** 4 ); // 16 (2 * 2 * 2 * 2, 4 times)
alert( 2 ** 2 ); // 2² = 4
alert( 2 ** 3 ); // 2³ = 8
alert( 2 ** 4 ); // 2⁴ = 16
```
Mathematically, the exponentiation is defined for non-integer numbers as well. For example, a square root is an exponentiation by `1/2`:
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)
@ -104,7 +108,12 @@ Here's a more complex example:
alert(2 + 2 + '1' ); // "41" and not "221"
```
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`.
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'`.
```js run
alert('1' + 2 + 2); // "122" and not "14"
```
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.
@ -185,22 +194,22 @@ Here's an extract from the [precedence table](https://developer.mozilla.org/en-U
| Precedence | Name | Sign |
|------------|------|------|
| ... | ... | ... |
| 17 | unary plus | `+` |
| 17 | unary negation | `-` |
| 16 | exponentiation | `**` |
| 15 | multiplication | `*` |
| 15 | division | `/` |
| 13 | addition | `+` |
| 13 | subtraction | `-` |
| 14 | unary plus | `+` |
| 14 | unary negation | `-` |
| 13 | exponentiation | `**` |
| 12 | multiplication | `*` |
| 12 | division | `/` |
| 11 | addition | `+` |
| 11 | subtraction | `-` |
| ... | ... | ... |
| 3 | assignment | `=` |
| 2 | assignment | `=` |
| ... | ... | ... |
As we can see, the "unary plus" has a priority of `17` 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
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`.
@ -214,7 +223,7 @@ alert( x ); // 5
The fact of `=` being an operator, not a "magical" language construct has an interesting implication.
Most operators in JavaScript return a value. That's obvious for `+` and `-`, but also true for `=`.
All operators in JavaScript return a value. That's obvious for `+` and `-`, but also true for `=`.
The call `x = value` writes the `value` into `x` *and then returns it*.
@ -294,9 +303,9 @@ Such operators have the same precedence as a normal assignment, so they run afte
```js run
let n = 2;
n *= 3 + 5;
n *= 3 + 5; // right part evaluated first, same as n *= 8
alert( n ); // 16 (right part evaluated first, same as n *= 8)
alert( n ); // 16
```
## Increment/decrement
@ -428,7 +437,7 @@ The list of operators:
- RIGHT SHIFT ( `>>` )
- ZERO-FILL RIGHT SHIFT ( `>>>` )
These operators are used very rarely, when we need to fiddle with numbers on the very lowest (bitwise) level. We won't need these operators any time soon, as web development has little use of them, but in some special areas, such as cryptography, they are useful. You can read the [Bitwise Operators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#Bitwise) chapter on MDN when a need arises.
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.
## Comma

View file

@ -7,7 +7,7 @@ In JavaScript they are written like this:
- 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>.
- 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 <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.

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?'
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)

View file

@ -68,7 +68,7 @@ if (cond) {
## 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:
```js run

View file

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

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

@ -1,6 +1,6 @@
# 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.
@ -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.
@ -123,7 +123,7 @@ This leads to some interesting usage compared to a "pure, classical, boolean-onl
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.
That 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.
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:

View file

@ -2,15 +2,14 @@
[recent browser="new"]
Here, in this article, we'll say that an expression is "defined" when it's neither `null` nor `undefined`.
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.
@ -21,29 +20,31 @@ We can rewrite `result = a ?? b` using the operators that we already know, like
result = (a !== null && a !== undefined) ? a : b;
```
The common use case for `??` is to provide a default value for a potentially undefined variable.
Now it should be absolutely clear what `??` does. Let's see where it helps.
For example, here we show `Anonymous` if `user` isn't defined:
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
alert(user ?? "Anonymous"); // Anonymous (user not defined)
```
Of course, if `user` had any value except `null/undefined`, then we would see it instead:
Here's the example with `user` assigned to a name:
```js run
let user = "John";
alert(user ?? "Anonymous"); // 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 undefined, if the user decided not to enter a value.
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 undefined.
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:
@ -75,7 +76,7 @@ alert(firstName || lastName || nickName || "Anonymous"); // Supercoder
*/!*
```
The OR `||` operator exists since the beginning of JavaScript, so developers were using it for such purposes for a long time.
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 `||`.
@ -96,18 +97,20 @@ alert(height || 100); // 100
alert(height ?? 100); // 0
```
- The `height || 100` checks `height` for being a falsy value, and it really is.
- so the result is the second argument, `100`.
- 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`.
If the zero height is a valid value, that shouldn't be replaced with the default, then `??` does just the right thing.
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 rather low: `5` in the [MDN table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#Table). So `??` is evaluated before `=` and `?`, but after most other operations, such as `+`, `*`.
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).
So if we'd like to choose a value with `??` in an expression with other operators, consider adding parentheses:
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;
@ -125,7 +128,7 @@ Otherwise, if we omit parentheses, then as `*` has the higher precedence than `?
// without parentheses
let area = height ?? 100 * width ?? 50;
// ...works the same as this (probably not what we want):
// ...works this way (not what we want):
let area = height ?? (100 * width) ?? 50;
```
@ -139,7 +142,7 @@ The code below triggers a syntax error:
let x = 1 && 2 ?? 3; // Syntax error
```
The limitation is surely debatable, but it was added to the language specification with the purpose to avoid programming mistakes, when people start to switch to `??` from `||`.
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:

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.
```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 has the following syntax:
@ -106,7 +119,7 @@ Let's examine the `for` statement part-by-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. |
| body | `alert(i)`| Runs again and again while the condition is truthy. |
| 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
```
````
### Skipping parts
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`.
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 '?'"
@ -286,7 +297,6 @@ if (i > 5) {
...and rewrite it using a question mark:
```js no-beautify
(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.
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:
```js
labelName: for (...) {
...
@ -342,6 +353,7 @@ The `break <labelName>` statement in the loop below breaks out to the label:
// do something with the value...
}
}
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.
For example, it is impossible to do this:
```js
break label; // doesn't jumps to the label below
break label; // jump to the label below (doesn't work)
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

View file

@ -47,7 +47,7 @@ switch (a) {
break;
*/!*
case 5:
alert( 'Too large' );
alert( 'Too big' );
break;
default:
alert( "I don't know such values" );
@ -139,7 +139,7 @@ switch (a) {
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

View file

@ -1 +1,3 @@
No difference.
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
function name(parameters) {
...body...
function name(parameter1, parameter2, ... parameterN) {
// body
}
```
@ -137,26 +137,23 @@ It's a good practice to minimize the use of global variables. Modern code has fe
## 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`.
```js run
function showMessage(*!*from, text*/!*) { // arguments: from, text
function showMessage(*!*from, text*/!*) { // parameters: from, text
alert(from + ': ' + text);
}
*!*
showMessage('Ann', 'Hello!'); // Ann: Hello! (*)
showMessage('Ann', "What's up?"); // Ann: What's up? (**)
*/!*
*!*showMessage('Ann', 'Hello!');*/!* // Ann: Hello! (*)
*!*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.
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
function showMessage(from, text) {
@ -175,9 +172,21 @@ showMessage(from, "Hello"); // *Ann*: Hello
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
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:
@ -185,9 +194,9 @@ For instance, the aforementioned function `showMessage(from, text)` can be calle
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
function showMessage(from, *!*text = "no text given"*/!*) {
@ -197,7 +206,13 @@ function showMessage(from, *!*text = "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:
@ -211,19 +226,55 @@ function showMessage(from, text = anotherFunction()) {
```smart header="Evaluation of default parameters"
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 in old JavaScript code"
Several years ago, JavaScript didn't support the syntax for default parameters. So people used other ways to specify them.
Nowadays, we can come across them in old scripts.
For example, an explicit check for `undefined`:
```js
function showMessage(from, text) {
*!*
if (text === undefined) {
text = 'no text given';
}
*/!*
alert( from + ": " + text );
}
```
...Or using the `||` operator:
```js
function showMessage(from, text) {
// 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';
...
}
```
````
### Alternative default parameters
Sometimes it makes sense to set default values for parameters not in the function declaration, but at a later stage, during its execution.
Sometimes it makes sense to assign default values for parameters at a later stage after the function declaration.
To check for an omitted parameter, we can compare it with `undefined`:
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 (text === undefined) { // if the parameter is missing
text = 'empty message';
}
*/!*
@ -237,18 +288,18 @@ showMessage(); // empty message
...Or we could use the `||` operator:
```js
// if text parameter is omitted or "" is passed, set it to 'empty'
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 falsy values, such as `0`, are considered regular:
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
// if there's no "count" parameter, show "unknown"
function showCount(count) {
// if count is undefined or null, show "unknown"
alert(count ?? "unknown");
}
@ -411,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 `_`.
These are exceptions. Generally functions names should be concise and descriptive.
These are exceptions. Generally function names should be concise and descriptive.
```
## Functions == Comments
@ -477,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.
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:

View file

@ -12,7 +12,9 @@ function sayHi() {
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
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`:
@ -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.
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
let sayHi = function() {
let sayHi = function() { // (1) create
alert( "Hello" );
};
@ -78,7 +90,7 @@ Everything would work the same.
````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
function sayHi() {
@ -90,9 +102,9 @@ let sayHi = function() {
}*!*;*/!*
```
The answer is simple:
- 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 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.
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
@ -132,13 +144,13 @@ function 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 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
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.
- *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
// Function Declaration
@ -182,7 +194,7 @@ First, the syntax: how to differentiate between them in the code.
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
// Function Expression
@ -279,7 +291,7 @@ if (age < 18) {
welcome(); // \ (runs)
*/!*
// |
function welcome() { // |
function welcome() { // |
alert("Hello!"); // | Function Declaration is available
} // | everywhere in the block where it's declared
// |
@ -289,7 +301,7 @@ if (age < 18) {
} else {
function welcome() {
function welcome() {
alert("Greetings!");
}
}
@ -348,7 +360,7 @@ welcome(); // ok now
```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".

View file

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

View file

@ -5,7 +5,7 @@ Replace Function Expressions with arrow functions in the code below:
```js run
function ask(question, yes, no) {
if (confirm(question)) yes()
if (confirm(question)) yes();
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:
```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:
```js
let func = function(arg1, arg2, ...argN) {
let func = function(arg1, arg2, ..., argN) {
return expression;
};
```
@ -33,7 +33,7 @@ let sum = function(a, b) {
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.
@ -48,7 +48,7 @@ As you can, see `(a, b) => a + b` means a function that accepts two arguments na
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
let sayHi = () => alert("Hello!");
@ -64,7 +64,7 @@ For instance, to dynamically create a function:
let age = prompt("What is your age?", 18);
let welcome = (age < 18) ?
() => alert('Hello') :
() => alert('Hello!') :
() => alert("Greetings!");
welcome();
@ -76,9 +76,9 @@ They are very convenient for simple one-line actions, when we're just too lazy t
## 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:
@ -86,7 +86,7 @@ Like this:
let sum = (a, b) => { // the curly brace opens a multiline function
let result = a + b;
*!*
return result; // if we use curly braces, then we need an explicit "return"
return result; // if we use curly braces, then we need an explicit "return"
*/!*
};
@ -105,7 +105,7 @@ For now, we can already use arrow functions for one-line actions and callbacks.
## 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.

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.
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.
@ -144,7 +144,7 @@ Assignments
: There is a simple assignment: `a = b` and combined ones like `a *= 2`.
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
: The only operator with three parameters: `cond ? resultA : resultB`. If `cond` is truthy, returns `resultA`, otherwise `resultB`.
@ -256,7 +256,7 @@ We covered three ways to create a function in JavaScript:
3. Arrow functions:
```js
// expression at the right side
// expression on the right side
let sum = (a, b) => a + b;
// or multi-line syntax with { ... }, need return here:
@ -273,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) {...}`.
- 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.
@ -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.
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)
@ -63,12 +63,12 @@ We can always find a list of breakpoints in the right panel. That's useful when
- ...And so on.
```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.
```
## Debugger command
## The command "debugger"
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
@ -99,7 +98,7 @@ Please open the informational dropdowns to the right (labeled with arrows). They
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.**
@ -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.
<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.
@ -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.
<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"
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.
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>.

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

@ -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.
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
show(parameters,
@ -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:
- [JSLint](http://www.jslint.com/) -- one of the first linters.
- [JSHint](http://www.jshint.com/) -- more settings than JSLint.
- [ESLint](http://eslint.org/) -- probably the newest one.
- [JSLint](https://www.jslint.com/) -- one of the first linters.
- [JSHint](https://jshint.com/) -- more settings than JSLint.
- [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.
@ -328,14 +328,14 @@ Here's an example of an `.eslintrc` file:
},
"rules": {
"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.
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.

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

@ -143,7 +143,7 @@ Such comments allow us to understand the purpose of the function and use it the
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?
: 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

@ -2,7 +2,7 @@
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.
@ -51,7 +51,7 @@ describe("pow", function() {
A spec has three main building blocks that you can see above:
`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() { ... })`
: 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.
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

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).
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).
## 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.
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.
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`.
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:
- [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.
```js
// before running the transpiler
height = height ?? 100;
So, if we're going to use modern language features, a transpiler and a polyfill are necessary.
## 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');
// after running the transpiler
height = (height !== undefined && height !== null) ? height : 100;
```
Examples that use modern JS will work only if your browser supports it.
````
Now the rewritten code is suitable for older JavaScript engines.
```offline
As you're reading the offline version, in PDF examples are not runnable. In EPUB some of them can run.
Usually, a developer runs the transpiler on their own computer, and then deploys the transpiled code to the server.
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

@ -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:

View file

@ -44,7 +44,7 @@ The resulting `user` object can be imagined as a cabinet with two signed files l
![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:
@ -62,7 +62,7 @@ user.isAdmin = true;
![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
delete user.age;
@ -92,30 +92,6 @@ let user = {
```
That is called a "trailing" or "hanging" comma. Makes it easier to add/remove/move around properties, because all lines become alike.
````smart header="Object with const can be changed"
Please note: an object declared as `const` *can* be modified.
For instance:
```js run
const user = {
name: "John"
};
*!*
user.name = "Pete"; // (*)
*/!*
alert(user.name); // Pete
```
It might seem that the line `(*)` would cause an error, but no. The `const` fixes the value of `user`, but not its contents.
The `const` would give an error only if we try to set `user=...` as a whole.
There's another way to make constant object properties, we'll cover it later in the chapter <info:property-descriptors>.
````
## Square brackets
For multiword properties, the dot access doesn't work:
@ -225,13 +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.
## 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:
@ -276,7 +252,7 @@ let user = {
## Property names limitations
As we already know, a variable cannot have a name equal to one of language-reserved words like "for", "let", "return" etc.
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:
@ -349,7 +325,7 @@ 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.
If we omit quotes, that means a variable, it should contain the actual name to be tested. For instance:
If we omit quotes, that means a variable should contain the actual name to be tested. For instance:
```js run
let user = { age: 30 };
@ -379,7 +355,7 @@ In the code above, the property `obj.test` technically exists. So the `in` opera
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.
@ -436,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:
@ -448,9 +424,10 @@ The phone codes go in the ascending sorted order, because they are integers. So
````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.
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
// Number(...) explicitly converts to a number
// 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", not same "+49" ⇒ not integer property
@ -505,7 +482,7 @@ They store properties (key-value pairs), where:
To access a property, we can use:
- 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:
- To delete a property: `delete obj.prop`.

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

View file

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="248" height="215" viewBox="0 0 248 215"><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-props.svg"><path fill="#FFF" d="M0 0h248v215H0z"/><path id="Rectangle-4-Copy" fill="#D1C4B1" stroke="#D1C4B1" stroke-width="4" d="M127.937 143l-16.667 20h130.46l-16.667-20h-97.126z" opacity=".5"/><g id="Group-2" transform="translate(124 3)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v157H0z"/><path id="Combined-Shape" fill="#E8C48F" d="M32 0v157H0V0h32zM16.5 126.613c-4.142 0-7.5 4.251-7.5 9.496 0 5.244 3.358 9.496 7.5 9.496 4.142 0 7.5-4.252 7.5-9.496 0-5.245-3.358-9.496-7.5-9.496zM28 6.33H4v110.153h24V6.33z"/></g><text id="name" fill="#EE6B47" font-family="PTMono-Bold, PT Mono" font-size="16" font-weight="bold" transform="rotate(-90 15.5 60.141)"><tspan x="-3.7" y="62.746">name</tspan></text></g><g id="Group-2-Copy" transform="translate(161 3)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v157H0z"/><path id="Combined-Shape" fill="#E8C48F" d="M32 0v157H0V0h32zM16.5 126.613c-4.142 0-7.5 4.251-7.5 9.496 0 5.244 3.358 9.496 7.5 9.496 4.142 0 7.5-4.252 7.5-9.496 0-5.245-3.358-9.496-7.5-9.496zM28 6.33H4v110.153h24V6.33z"/></g><text id="age" fill="#EE6B47" font-family="PTMono-Bold, PT Mono" font-size="16" font-weight="bold" transform="rotate(-90 15.5 60.141)"><tspan x="1.1" y="62.746">age</tspan></text></g><g id="Group-2-Copy-2" transform="translate(198 3)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v157H0z"/><path id="Combined-Shape" fill="#E8C48F" d="M32 0v157H0V0h32zM16.5 126.613c-4.142 0-7.5 4.251-7.5 9.496 0 5.244 3.358 9.496 7.5 9.496 4.142 0 7.5-4.252 7.5-9.496 0-5.245-3.358-9.496-7.5-9.496zM28 6.33H4v110.153h24V6.33z"/></g><text id="likes-birds" fill="#EE6B47" font-family="PTMono-Bold, PT Mono" font-size="14" font-weight="bold" transform="rotate(-90 17.5 60.774)"><tspan x="-28.7" y="63.278">likes birds</tspan></text></g><path id="Rectangle-4" fill="#FFF9EB" stroke="#BCA68E" stroke-width="4" d="M109 157h135v50H109z"/><path id="Rectangle-8" stroke="#BCA68E" stroke-width="3" d="M164.5 177.5h25v10h-25z"/><text id="user" fill="#EE6B47" font-family="OpenSans-Bold, Open Sans" font-size="14" font-weight="bold"><tspan x="5" y="187">user</tspan></text><path id="Line-8" fill="#EE6B47" fill-rule="nonzero" d="M71.5 173l19 9.5-19 9.5v-8H45v-3h26.5v-8z"/></g></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="248" height="215" viewBox="0 0 248 215"><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-props.svg"><path fill="#FFF" d="M0 0h248v215H0z"/><path id="Rectangle-4-Copy" fill="#DBAF88" stroke="#DBAF88" stroke-width="4" d="M225.063 143l16.667 20H111.27l16.667-20h97.126z" opacity=".5"/><g id="Group-2" transform="translate(124 3)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v157H0z"/><path id="Combined-Shape" fill="#DBAF88" d="M32 0v157H0V0h32zM16.5 126.613c-4.142 0-7.5 4.251-7.5 9.496 0 5.244 3.358 9.496 7.5 9.496 4.142 0 7.5-4.252 7.5-9.496 0-5.245-3.358-9.496-7.5-9.496zM28 6.33H4v110.153h24V6.33z"/></g><text id="name" fill="#C06334" font-family="PTMono-Bold, PT Mono" font-size="16" font-weight="bold" transform="rotate(-90 13.105 60.141)"><tspan x="-6.095" y="65.141">name</tspan></text></g><g id="Group-2-Copy" transform="translate(161 3)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v157H0z"/><path id="Combined-Shape" fill="#DBAF88" d="M32 0v157H0V0h32zM16.5 126.613c-4.142 0-7.5 4.251-7.5 9.496 0 5.244 3.358 9.496 7.5 9.496 4.142 0 7.5-4.252 7.5-9.496 0-5.245-3.358-9.496-7.5-9.496zM28 6.33H4v110.153h24V6.33z"/></g><text id="age" fill="#C06334" font-family="PTMono-Bold, PT Mono" font-size="16" font-weight="bold" transform="rotate(-90 13.105 60.141)"><tspan x="-1.295" y="65.141">age</tspan></text></g><g id="Group-2-Copy-2" transform="translate(198 3)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v157H0z"/><path id="Combined-Shape" fill="#DBAF88" d="M32 0v157H0V0h32zM16.5 126.613c-4.142 0-7.5 4.251-7.5 9.496 0 5.244 3.358 9.496 7.5 9.496 4.142 0 7.5-4.252 7.5-9.496 0-5.245-3.358-9.496-7.5-9.496zM28 6.33H4v110.153h24V6.33z"/></g><text id="likes-birds" fill="#C06334" font-family="PTMono-Bold, PT Mono" font-size="14" font-weight="bold" transform="rotate(-90 15.504 60.774)"><tspan x="-30.696" y="65.274">likes birds</tspan></text></g><path id="Rectangle-4" fill="#FBF2EC" stroke="#DBAF88" stroke-width="4" d="M109 157h135v50H109z"/><path id="Rectangle-8" stroke="#DBAF88" stroke-width="3" d="M164.5 177.5h25v10h-25z"/><text id="user" fill="#C06334" font-family="OpenSans-Bold, Open Sans" font-size="14" font-weight="bold"><tspan x="5" y="187">user</tspan></text><path id="Line-8" fill="#C06334" fill-rule="nonzero" d="M71.5 173l19 9.5-19 9.5v-8H45v-3h26.5v-8z"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 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.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(142 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(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="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><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="11" y="145">user</tspan></text><path id="Line-8" fill="#EE6B47" fill-rule="nonzero" d="M77.5 131l19 9.5-19 9.5v-8H51v-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.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(142 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(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="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><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="11" y="145">user</tspan></text><path id="Line-8" fill="#C06334" fill-rule="nonzero" d="M77.5 131l19 9.5-19 9.5v-8H51v-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="176" height="183" viewBox="0 0 176 183"><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.svg"><path fill="#FFF" d="M0 0h176v183H0z"/><path id="Rectangle-4-Copy" fill="#D1C4B1" stroke="#D1C4B1" stroke-width="4" d="M36.937 113L20.27 133h130.46l-16.667-20H36.937z" opacity=".5"/><g id="Group-2" transform="translate(33 6)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v124H0z"/><path id="Combined-Shape" fill="#E8C48F" d="M32 0v124H0V0h32zM16.5 100a7.5 7.5 0 100 15 7.5 7.5 0 000-15zM28 5H4v87h24V5z"/></g><text id="key1" fill="#EE6B47" font-family="PTMono-Bold, PT Mono" font-size="16" font-weight="bold" transform="rotate(-90 15.5 47.5)"><tspan x="-3.7" y="52.5">key1</tspan></text></g><g id="Group-2-Copy" transform="translate(70 6)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v124H0z"/><path id="Combined-Shape" fill="#E8C48F" d="M32 0v124H0V0h32zM16.5 100a7.5 7.5 0 100 15 7.5 7.5 0 000-15zM28 5H4v87h24V5z"/></g><text id="key2" fill="#EE6B47" font-family="PTMono-Bold, PT Mono" font-size="16" font-weight="bold" transform="rotate(-90 15.5 47.5)"><tspan x="-3.7" y="52.5">key2</tspan></text></g><g id="Group-2-Copy-2" transform="translate(107 6)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v124H0z"/><path id="Combined-Shape" fill="#E8C48F" d="M32 0v124H0V0h32zM16.5 100a7.5 7.5 0 100 15 7.5 7.5 0 000-15zM28 5H4v87h24V5z"/></g><text id="key3" fill="#EE6B47" font-family="PTMono-Bold, PT Mono" font-size="16" font-weight="bold" transform="rotate(-90 15.5 47.5)"><tspan x="-3.7" y="52.5">key3</tspan></text></g><path id="Rectangle-4" fill="#FFF9EB" stroke="#BCA68E" stroke-width="4" d="M18 127h135v50H18z"/><path id="Rectangle-8" stroke="#BCA68E" stroke-width="3" d="M73.5 147.5h25v10h-25z"/></g></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="176" height="183" viewBox="0 0 176 183"><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.svg"><path fill="#FFF" d="M0 0h176v183H0z"/><path id="Rectangle-4-Copy" fill="#DBAF88" stroke="#DBAF88" stroke-width="4" d="M134.063 113l16.667 20H20.27l16.667-20h97.126z" opacity=".5"/><g id="Group-2" transform="translate(33 6)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v124H0z"/><path id="Combined-Shape" fill="#DBAF88" d="M32 0v124H0V0h32zM16.5 100a7.5 7.5 0 100 15 7.5 7.5 0 000-15zM28 5H4v87h24V5z"/></g><text id="key1" fill="#C06334" font-family="PTMono-Bold, PT Mono" font-size="16" font-weight="bold" transform="rotate(-90 15.5 47.5)"><tspan x="-3.7" y="52.5">key1</tspan></text></g><g id="Group-2-Copy" transform="translate(70 6)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v124H0z"/><path id="Combined-Shape" fill="#DBAF88" d="M32 0v124H0V0h32zM16.5 100a7.5 7.5 0 100 15 7.5 7.5 0 000-15zM28 5H4v87h24V5z"/></g><text id="key2" fill="#C06334" font-family="PTMono-Bold, PT Mono" font-size="16" font-weight="bold" transform="rotate(-90 15.5 47.5)"><tspan x="-3.7" y="52.5">key2</tspan></text></g><g id="Group-2-Copy-2" transform="translate(107 6)"><g id="Group"><path id="Rectangle-7" fill="#FFF" d="M0 0h32v124H0z"/><path id="Combined-Shape" fill="#DBAF88" d="M32 0v124H0V0h32zM16.5 100a7.5 7.5 0 100 15 7.5 7.5 0 000-15zM28 5H4v87h24V5z"/></g><text id="key3" fill="#C06334" font-family="PTMono-Bold, PT Mono" font-size="16" font-weight="bold" transform="rotate(-90 15.5 47.5)"><tspan x="-3.7" y="52.5">key3</tspan></text></g><path id="Rectangle-4" fill="#FBF2EC" stroke="#DBAF88" stroke-width="4" d="M18 127h135v50H18z"/><path id="Rectangle-8" stroke="#DBAF88" stroke-width="3" d="M73.5 147.5h25v10h-25z"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before After
Before After

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