Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sync with upstream @ 540d753e#105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
javascript-translate-bot wants to merge2,331 commits intomaster
base:master
Choose a base branch
Loading
fromsync-540d753e
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
2331 commits
Select commitHold shift + click to select a range
86ed165
grammar suggestion
Sep 24, 2022
1b87b89
Omitting parentheses after `new`
web-dev-samSep 25, 2022
a965e49
typo
joaquinelioSep 27, 2022
4c693a2
Update article.md
skromezSep 27, 2022
1292386
typo
joaquinelioSep 28, 2022
fe525d2
Change link to the spec
romanstetsykSep 28, 2022
f2ef231
Fix typo "stirng" to "string"
ann-kilzerSep 29, 2022
8d89b7f
ECMA broken link
joaquinelioSep 29, 2022
24dfb1f
Remove description of inconsistency between Chrome and Firefox
wdscxsjSep 29, 2022
594bc55
https link
joaquinelioSep 29, 2022
15ab2fd
Merge pull request #3209 from joaquinelio/patch-18
iliakanSep 30, 2022
fde193a
Merge pull request #3208 from wdscxsj/patch-1
iliakanSep 30, 2022
63bc08e
Merge pull request #3207 from joaquinelio/patch-17
iliakanSep 30, 2022
4d42242
Merge pull request #3206 from ann-kilzer/patch-1
iliakanSep 30, 2022
dc6e7d1
Merge pull request #3205 from romanstetsyk/master
iliakanSep 30, 2022
e0621be
Merge pull request #3202 from joaquinelio/patch-15
iliakanOct 1, 2022
4a9dc8e
Merge pull request #3204 from joaquinelio/patch-16
iliakanOct 1, 2022
c8b4d34
move Unicode to a separate article
iliakanOct 1, 2022
98d0c2c
Merge pull request #3201 from MindLaborDev/patch-1
iliakanOct 1, 2022
b24e3fb
Merge pull request #3200 from digital-bw/patch-4
iliakanOct 1, 2022
586cc54
Merge pull request #3199 from digital-bw/patch-3
iliakanOct 1, 2022
2cb64ab
Merge pull request #3198 from skromez/master
iliakanOct 1, 2022
2180da8
Merge pull request #3197 from digital-bw/patch-2
iliakanOct 1, 2022
aedeed3
Merge pull request #3195 from digital-bw/patch-1
iliakanOct 1, 2022
c27a7b4
closes #3185
iliakanOct 1, 2022
c589176
closes #3183
iliakanOct 1, 2022
666f356
closes #3190
iliakanOct 1, 2022
c99d740
closes #3179
iliakanOct 1, 2022
18b1314
closes #3096
iliakanOct 2, 2022
cd86528
Fix typo
wdscxsjOct 3, 2022
165a3f5
typo "optimzed
joaquinelioOct 3, 2022
f0ce7e9
IE 9
joaquinelioOct 3, 2022
f0fa52f
Fix typo
wdscxsjOct 4, 2022
3a5d32e
Remove typo
aki-mizuOct 5, 2022
4573d0b
Fix typos
TevaHenryOct 5, 2022
dca45f7
Unicode art, grammar suggestions
joaquinelioOct 5, 2022
dc7a157
Update article.md
joaquinelioOct 5, 2022
87c0ca9
mdn link
joaquinelioOct 6, 2022
af4843b
👾 smth
RnbsovOct 8, 2022
530dc9f
👾 smth
RnbsovOct 8, 2022
1d999c7
👾 smth
RnbsovOct 8, 2022
429caba
👾 smth
RnbsovOct 8, 2022
306a197
Update article.md
joaquinelioOct 10, 2022
69bfbb0
Update article.md
joaquinelioOct 10, 2022
b89b938
Update article.md
joaquinelioOct 10, 2022
455c57a
Update article.md
joaquinelioOct 10, 2022
6f34912
Update article.md
joaquinelioOct 10, 2022
bf7d8bb
Merge pull request #3220 from joaquinelio/patch-19
iliakanOct 10, 2022
7b0f9e5
Content-Length is now a CORS-safelisted response header
wdscxsjOct 11, 2022
fe8ed87
Fix typo
wdscxsjOct 12, 2022
75edb67
strict-origin-when-cross-origin is now the default referrerPolicy
wdscxsjOct 12, 2022
0c5ac0e
typo at String concatenation with binary
adam4njOct 13, 2022
ca42edd
Remove a redundant argument
wdscxsjOct 13, 2022
0487c35
Remove use of error.message in onerror()
wdscxsjOct 14, 2022
c09efa8
http to https checked links
joaquinelioOct 14, 2022
2ca8f83
closes #3242
iliakanOct 18, 2022
245e59e
closes #3239
iliakanOct 18, 2022
28803aa
Merge pull request #3238 from joaquinelio/pp
iliakanOct 18, 2022
2f37897
minor fixes
iliakanOct 18, 2022
f6cb5e9
Merge pull request #3237 from wdscxsj/patch-9
iliakanOct 18, 2022
321b05e
Merge pull request #3223 from joaquinelio/patch-20
iliakanOct 18, 2022
508ca01
closes #3229
iliakanOct 18, 2022
5f91fda
closes #3230
iliakanOct 18, 2022
aaf3b5b
Merge pull request #3231 from wdscxsj/patch-4
iliakanOct 18, 2022
91e8edd
Merge pull request #3232 from wdscxsj/patch-5
iliakanOct 18, 2022
36eb3da
Merge pull request #3233 from wdscxsj/patch-6
iliakanOct 18, 2022
b0e2e04
Merge pull request #3234 from adam4nj/patch-1
iliakanOct 18, 2022
a4050f2
Merge pull request #3235 from wdscxsj/patch-7
iliakanOct 18, 2022
5dff42b
closes #3222
iliakanOct 18, 2022
0c8e883
typo *udefined
joaquinelioOct 20, 2022
4edd6b5
Proper Polish language inflection
f6pOct 20, 2022
094aa10
Add .at( ) to strings summary
joaquinelioOct 20, 2022
434e637
For the completeness of example.
Vic-BonlightOct 28, 2022
b3c7a7f
👾 add run button and remove typo
RnbsovOct 29, 2022
515dc44
👾 smth
RnbsovOct 29, 2022
78a9566
👾 smth
RnbsovOct 29, 2022
9e08049
👾 smth
RnbsovOct 29, 2022
1bda839
fix: typo getRangesAt to getRangeAt
levidingOct 30, 2022
55b6c5e
Update article.md
nikolai-chernolutskiiOct 30, 2022
588117e
Update index.html
Alexandre887Oct 30, 2022
4943f21
Update article.md
alagunoffNov 1, 2022
8d185f7
Update article.md
Alexandre887Nov 4, 2022
c70a3dc
Merge pull request #3218 from aki-mizu/patch-1
iliakanNov 13, 2022
1fb0500
Merge pull request #3219 from TevaHenry/localstorage-sessionstorage
iliakanNov 13, 2022
fe3d781
Merge pull request #3227 from Rnbsov/patch-75
iliakanNov 13, 2022
1b078d0
Merge pull request #3245 from joaquinelio/patch-19
iliakanNov 13, 2022
294a91e
Merge pull request #3246 from f6p/patch-1
iliakanNov 13, 2022
083de40
Merge pull request #3247 from joaquinelio/patch-20
iliakanNov 13, 2022
a4f1afd
Merge pull request #3248 from Victor-Nikliaiev/patch-1
iliakanNov 13, 2022
fac9385
fixes #3249
iliakanNov 13, 2022
ffbe0f5
Merge pull request #3251 from Rnbsov/patch-77
iliakanNov 13, 2022
f47885b
minor fixes
iliakanNov 13, 2022
7048f44
Merge pull request #3252 from leviding/patch-7
iliakanNov 13, 2022
2c8f0fc
Merge pull request #3253 from nikolai-chernolutskii/patch-1
iliakanNov 13, 2022
6fc7ba3
Merge pull request #3254 from Alexandre887/master
iliakanNov 13, 2022
121141b
minor fixes
iliakanNov 13, 2022
a665e29
Merge pull request #3255 from alagunoff/patch-1
iliakanNov 13, 2022
8d9ecb7
Merge pull request #3258 from Alexandre887/patch-1
iliakanNov 13, 2022
dafc925
the output is 0
joaquinelioNov 14, 2022
c918da4
map.delete removes the pair key/value
joaquinelioNov 14, 2022
9f1848c
Update article.md
joaquinelioNov 14, 2022
d52f318
fix typo on Remainder %
cerealexperimentsNov 15, 2022
e1bec69
Merge pull request #3267 from cerealexperiments/patch-1
iliakanNov 15, 2022
e912311
Merge pull request #3265 from joaquinelio/patch-20
iliakanNov 15, 2022
cfc0195
Merge branch 'master' into patch-19
iliakanNov 15, 2022
33c48a4
Merge pull request #3264 from joaquinelio/patch-19
iliakanNov 15, 2022
477cb58
Merge pull request #3214 from joaquinelio/patch-17
iliakanNov 15, 2022
746ad80
closes #3260
iliakanNov 16, 2022
4e26c7e
Suggestion
bogdanbacoscaNov 26, 2022
657e389
minor code formatting
bogdanbacoscaNov 26, 2022
45a2d14
other code formatting bits
bogdanbacoscaNov 26, 2022
66ad8c1
Revert "minor code formatting"
bogdanbacoscaNov 26, 2022
67fe46f
Merge pull request #3279 from bogdanbacosca/if-else-bogdan
iliakanNov 30, 2022
cfe2249
Bezier curves: update paused demo on point move
orelbyNov 30, 2022
1ce5644
Merge pull request #3287 from orelby/animation/bezier-curve/update-de…
iliakanNov 30, 2022
8375316
fix typo, remove pleonasm
a-v-gorDec 6, 2022
e75f655
small format change
joaquinelioDec 7, 2022
4a8e8e1
Update article.md
Violet-Bora-LeeDec 7, 2022
3f305f5
Merge pull request #3292 from a-v-gor/proofreading
iliakanDec 11, 2022
9a26eb0
Merge pull request #3293 from joaquinelio/patch-19
iliakanDec 11, 2022
ea7738b
Merge pull request #3295 from Violet-Bora-Lee/patch-4
iliakanDec 11, 2022
b2e7dbf
grammar & legility (to check)
joaquinelioDec 12, 2022
88d9b3f
removed -> remove; optimzed -> optimized ;
sagarpanchalJan 18, 2023
ccd0a11
Fix "JavaScript specials" links
odsantosJan 22, 2023
ae7afcb
update
bogdanbacoscaJan 24, 2023
03b8f2e
Merge pull request #3278 from bogdanbacosca/work
iliakanJan 24, 2023
cd988dd
Fix a typo
MAHIN0093Jan 24, 2023
bbf3a44
Update 1-js/05-data-types/04-array/article.md
MAHIN0093Jan 24, 2023
f489288
Update button to fix horizontal scroll on mobile
marcusicaroJan 25, 2023
4baa619
fix: add missing word 'to'
JeraldVinJan 26, 2023
a4e9ba5
Merge pull request #3336 from JeraldVin/patch-1
iliakanJan 26, 2023
d906956
Merge pull request #3334 from marcusicaro/patch-1
iliakanJan 26, 2023
f9afaf3
Merge pull request #3330 from odsantos/fix-javascript-specials-links
iliakanJan 26, 2023
5a3db89
Merge pull request #3332 from MAHIN0093/change
iliakanJan 26, 2023
9e3fa13
Merge pull request #3302 from joaquinelio/patch-19
iliakanJan 29, 2023
968fa09
added a word
Raviikumar001Apr 4, 2023
ea5fbfa
added word fix
Raviikumar001Apr 6, 2023
af71856
Merge pull request #3425 from Raviikumar001/Added-a-word
iliakanApr 17, 2023
cd8dd53
#3345 Fixed Grammar
pradeep-ramolaApr 23, 2023
733ff69
Merge pull request #3435 from pradeep-ramola/master
iliakanApr 29, 2023
e68750e
translated Russian word into English
MSHNK1Jul 9, 2023
023c0ec
Fixing a minor grammatical typo in the document.
rahulrao0209Jul 16, 2023
d694e89
Merge pull request #3492 from MSHNK1/fix-typos
iliakanJul 17, 2023
285083f
minor fixes
iliakanAug 7, 2023
8ab6b39
Add WeakRef and FinalizationRegistry article
WOLFRIENDNov 4, 2023
5ab1ce2
Merge pull request #3609 from WOLFRIEND/master
iliakanNov 15, 2023
b7ebc1b
Improve awkward sentence structure
smith558Nov 24, 2023
75bad83
Improve grammar
smith558Nov 24, 2023
74a8a19
Fix formatting char
smith558Nov 27, 2023
d51037a
Fix grammar and add an example
nakhodkinDec 27, 2023
c66bace
Fix grammar and typos
nakhodkinDec 31, 2023
bbac8a5
Fix grammar and JavaScript syntax
nakhodkinJan 2, 2024
1b9a28b
Update article.md
JaFro96Jan 4, 2024
4ec440f
Update article.md
JaFro96Jan 4, 2024
d83bfb2
refactor: Updated RFC spec Safe Methods URL in Cookies chapter
alexandermirzoyanJan 12, 2024
9ec34c6
Replace assignment with equals in Truncate the text task
CJDumbletonJan 17, 2024
2e0d5fb
Add missing word
qadzekJan 20, 2024
52e184c
Add missing CSS unit
qadzekJan 20, 2024
0530c92
fix square brackets
mikayel00Jan 24, 2024
9270fe5
Merge pull request #3639 from JaFro96/master
smith558Jan 24, 2024
f0f1006
fix: json
mikayel00Jan 24, 2024
c98ec82
Merge pull request #3647 from CJDumbleton/CJDumbleton-patch-1
smith558Jan 24, 2024
9c07c5b
Merge pull request #3649 from qadzek/patch-1
smith558Jan 24, 2024
1a6edd7
Merge pull request #3656 from mikayel00/fix-brackets
smith558Jan 26, 2024
9d157d8
Merge pull request #3617 from smith558/patch-3
smith558Jan 27, 2024
b6c604a
Merge branch 'master' into patch-5
smith558Jan 27, 2024
4286703
Merge pull request #3644 from alexandermirzoyan/patch-2
smith558Jan 27, 2024
26ac4c8
Merge pull request #3212 from wdscxsj/patch-2
smith558Jan 27, 2024
f24e463
Merge pull request #3213 from joaquinelio/patch-15
smith558Jan 27, 2024
774d0c1
Merge pull request #3326 from sagarpanchal/patch-2
smith558Jan 27, 2024
aacfc93
Fixed grammar error in regex-groups article.md
eedrxsJan 27, 2024
e2ac312
Merge pull request #3659 from eedrxs/patch-1
smith558Jan 27, 2024
ee62307
Update article.md
nepiknFeb 2, 2024
4a20875
Update article.md
smith558Feb 11, 2024
5ce4b3a
Merge pull request #3664 from nepikn/patch-2
smith558Feb 11, 2024
daca277
Fix grammar
smith558Feb 11, 2024
3e92613
Improve options description
smith558Feb 11, 2024
b6e7472
Update samesite content
smith558Feb 13, 2024
d134cab
Remove "surely"
smith558Feb 13, 2024
19e62af
Update article.md
smith558Feb 13, 2024
a7d351f
change IndexedDb to IndexedDB (#3660)
0xtpslFeb 13, 2024
ab1db04
Fix grammar and typos (#3628)
nakhodkinFeb 14, 2024
d461a93
Merge pull request #3217 from wdscxsj/patch-3
smith558Feb 14, 2024
00bdf88
Update LICENSE.md
iliakanMar 8, 2024
25c9bdf
Update LICENSE.md
iliakanMar 8, 2024
c13e707
Update LICENSE.md
iliakanMar 8, 2024
e15f535
Update LICENSE.md
iliakanMar 8, 2024
2f91d87
Update LICENSE.md
iliakanMar 8, 2024
ea05aa9
Updated result visualization
Filin3Mar 31, 2024
04b73bf
Merge pull request #3681 from Filin3/patch-1
smith558May 5, 2024
acf339c
Merge pull request #3632 from nakhodkin/patch-2
smith558May 5, 2024
541b7f9
Merge pull request #3636 from nakhodkin/patch-5
smith558May 5, 2024
0b9bc2f
Merge pull request #3634 from nakhodkin/patch-4
smith558May 5, 2024
85da6f1
Update article.md
ellie-heidariMay 10, 2024
475899e
Update article.md
smith558May 17, 2024
7e524ba
Add link
smith558May 17, 2024
42851f4
Update task.md
pvepamb1May 18, 2024
2092da7
Merge pull request #3694 from pvepamb1/patch-1
smith558May 18, 2024
f684d39
change example element of multidimensional array
sneeedJun 8, 2024
c151e11
minor fixes
iliakanJun 13, 2024
3fd3f98
- `run`
Alexandre887Jun 23, 2024
d1ffe5d
docs: remove eval polyfill.io
kricsleoJul 5, 2024
262f91a
Merge pull request #3712 from kricsleo/patch-1
smith558Jul 8, 2024
815fafa
Merge pull request #3692 from ellie-heidari/patch-1
smith558Jul 8, 2024
d6e0376
Remove BigInt IE incompatibility part (#3709)
FloffyGarlicJul 9, 2024
5a0df77
Update article.md
shallow-beachJul 10, 2024
62827d8
Merge pull request #3715 from shallow-beach/master
smith558Jul 10, 2024
4104eba
Merge pull request #3704 from Alexandre887/patch-10
smith558Jul 10, 2024
ca72abb
Merge pull request #3700 from sneeed/patch-2
smith558Jul 10, 2024
b258d7d
Merge pull request #3495 from rahulrao0209/patch-1
smith558Jul 10, 2024
6f08958
minor fix to function name written in explanation
tonybishnoiOct 9, 2024
eedc262
Grammatical fix
nikoandpikoOct 22, 2024
34a80e7
Merge pull request #3768 from tonybishnoi/patch-1
smith558Oct 24, 2024
67833c9
Update article.md
zakingslayerv22Dec 11, 2024
b36823a
better wording
pj-szdmDec 18, 2024
dc14378
Update article.md
mhi1627Jan 22, 2025
8b2a2f2
Improve readability
AdityaGirdharJan 30, 2025
a2b97b5
Merge pull request #3810 from AdityaGirdhar/patch-1
smith558Feb 4, 2025
793ad4b
Merge branch 'master' into patch-1
smith558Feb 4, 2025
e466826
Merge pull request #3772 from nikoandpiko/patch-1
smith558Feb 4, 2025
a087279
Merge pull request #3804 from mhi1627/patch-1
smith558Feb 8, 2025
26daef2
Merge pull request #3794 from zakingslayerv22/patch-1
smith558Feb 8, 2025
6236eb8
Merge pull request #3797 from pj-szdm/patch-1
smith558Feb 8, 2025
011dd4f
Update article.md
Gleb-PastushenkoFeb 10, 2025
1dce5b7
Merge pull request #3815 from Gleb-Pastushenko/patch-6
smith558Feb 10, 2025
4b3474b
Fixed missing closing parenthesis in 2-ui/4-forms-control/1-form-elem…
vincent-clipetMar 10, 2025
3d7abb9
Merge pull request #3822 from vincent-clipet/fix/missing_parenthesis
smith558Mar 10, 2025
3de63df
promise.all task
iliakanMar 24, 2025
ef31066
minor fixes
iliakanMar 24, 2025
de4247b
minor fixes
iliakanMar 24, 2025
0af25bc
minor fixes
iliakanMar 24, 2025
d932e52
minor fixes
iliakanMar 24, 2025
f0d8abb
minor fixes
iliakanMar 24, 2025
f775835
minor fixes
iliakanMar 24, 2025
0760c90
minor fixes
iliakanMar 24, 2025
5dea441
minor fixes
iliakanMar 24, 2025
035c526
minor fixes
iliakanMar 24, 2025
4c4598b
Fix for #3826 - Removed errorception.com from the respective md file.
Paramesh-T-SMar 29, 2025
cde189d
Update Safari settings screenshots
dangermanApr 2, 2025
78c6c44
Update Safari devtools instructions
dangermanApr 2, 2025
e88c212
Update Function object, NFE article
rahulrao0209Apr 6, 2025
a711a1f
Merge pull request #3830 from Paramesh-T-S/Issue_fix_Outdate_-link_in…
iliakanApr 8, 2025
efaa9aa
sentry.io added as per suggestion - https://github.com/javascript-tut…
Paramesh-T-SApr 8, 2025
6cc5077
Merge pull request #3835 from Paramesh-T-S/Issue_fix_Outdate_-link_in…
iliakanApr 9, 2025
81cfee9
Update article.md
rahulrao0209Apr 13, 2025
e2d8ebe
Merge pull request #3836 from rahulrao0209/patch-3
smith558Apr 13, 2025
6bbdd0c
Merge pull request #3834 from rahulrao0209/patch-2
smith558Apr 13, 2025
d3c395c
Merge pull request #3832 from dangerman/update-safari-devtools-screen…
smith558Apr 13, 2025
540d753
Replace with up to date screenshots
smith558Apr 13, 2025
8f1634c
merging all conflicts
iliakanJun 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions.github/FUNDING.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
github: iliakan
1 change: 1 addition & 0 deletions.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,3 +21,4 @@ sftp-config.json
Thumbs.db


/svgs
78 changes: 78 additions & 0 deletions1-js/01-getting-started/1-intro/article.md
View file
Open in desktop

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions1-js/01-getting-started/2-manuals-specifications/article.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,22 +2,35 @@

ਇਹ ਕਿਤਾਬ ਇਕ * ਟਿਟੋਰਿਯਲ * ਹੈ. ਇਸਦਾ ਉਦੇਸ਼ ਤੁਹਾਨੂੰ ਹੌਲੀ ਹੌਲੀ ਭਾਸ਼ਾ ਸਿੱਖਣ ਵਿਚ ਸਹਾਇਤਾ ਕਰਨਾ ਹੈ. ਪਰ ਇਕ ਵਾਰ ਜਦੋਂ ਤੁਸੀਂ ਮੁਢਲੀਆਂ ਗੱਲਾਂ ਤੋਂ ਜਾਣੂ ਹੋਵੋਗੇ, ਤੁਹਾਨੂੰ ਹੋਰ ਸਰੋਤਾਂ ਦੀ ਜ਼ਰੂਰਤ ਹੋਏਗੀ.

<<<<<<< HEAD
## ਨਿਰਧਾਰਨ
=======
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.
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b

[ECMA-262 ਨਿਰਧਾਰਨ] (https://www.ecma-international.org/publications/standards/Ecma-262.htm) ਵਿੱਚ ਜਾਵਾ ਸਕ੍ਰਿਪਟ ਬਾਰੇ ਸਭ ਤੋਂ ਡੂੰਘਾਈ, ਵਿਸਥਾਰ ਅਤੇ ਰਸਮੀ ਜਾਣਕਾਰੀ ਹੈ. ਇਹ ਭਾਸ਼ਾ ਨੂੰ ਪਰਿਭਾਸ਼ਤ ਕਰਦਾ ਹੈ.

ਪਰ ਉਹ ਰਸਮੀ ਹੋਣ ਕਰਕੇ, ਪਹਿਲਾਂ ਸਮਝਣਾ ਮੁਸ਼ਕਲ ਹੈ. ਇਸ ਲਈ ਜੇ ਤੁਹਾਨੂੰ ਭਾਸ਼ਾ ਦੇ ਵੇਰਵਿਆਂ ਬਾਰੇ ਜਾਣਕਾਰੀ ਦੇ ਸਭ ਤੋਂ ਭਰੋਸੇਮੰਦ ਸਰੋਤ ਦੀ ਜ਼ਰੂਰਤ ਹੈ, ਤਾਂ ਨਿਰਧਾਰਨ ਸਹੀ ਜਗ੍ਹਾ ਹੈ. ਪਰ ਇਹ ਰੋਜ਼ਾਨਾ ਵਰਤੋਂ ਲਈ ਨਹੀਂ ਹੈ.

ਇੱਕ ਨਵਾਂ ਸਪੈਸੀਫਿਕੇਸ਼ਨ ਵਰਜ਼ਨ ਹਰ ਸਾਲ ਜਾਰੀ ਕੀਤਾ ਜਾਂਦਾ ਹੈ. ਇਨ੍ਹਾਂ ਰੀਲੀਜ਼ਾਂ ਦੇ ਵਿਚਕਾਰ, ਤਾਜ਼ਾ ਨਿਰਧਾਰਣ ਖਰੜਾ <https://tc39.es/ecma262/> 'ਤੇ ਹੈ.

<<<<<<< HEAD
ਨਵੀਆਂ ਨਕੋਰ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਬਾਰੇ ਪੜ੍ਹਨ ਲਈ, ਜੋ "ਲਗਭਗ ਸਟੈਂਡਰਡ" (ਅਖੌਤੀ "ਪੜਾਅ 3") ਹਨ, <https://github.com/tc39/proposals> ਤੇ ਪ੍ਰਸਤਾਵ ਵੇਖੋ.
=======
A new specification version is released every year. Between these releases, the latest specification draft is at <https://tc39.es/ecma262/>.
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b

ਨਾਲ ਹੀ, ਜੇ ਤੁਸੀਂ ਬ੍ਰਾਜ਼ਰ ਲਈ ਡਵੈਲਪ ਕਰ ਰਹੇ ਹੋ, ਤਾਂ ਟਿਯੂਟੋਰਿਅਲ ਦੇ [ਦੂਜੇ ਭਾਗ] (ਜਾਣਕਾਰੀ: ਬਰਾਜ਼ਰ-ਵਾਤਾਵਰਣ) ਵਿਚ ਕਵਰ ਕੀਤੇ ਗਈ ਹੋਰ ਵੀ ਕਿਸਮਾਂ ਹਨ.

<<<<<<< HEAD
## ਮੈਨੂਅਲ
=======
Also, if you're developing for the browser, then there are other specifications covered in the [second part](info:browser-environment) of the tutorial.
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b

- ** ਐਮਡੀਐਨ (ਮੋਜ਼ੀਲਾ) ਜਾਵਾ ਸਕ੍ਰਿਪਟ ਹਵਾਲਾ ** ਇੱਕ ਮੈਨੂਅਲ ਹੈ ਜੋ ਉਦਾਹਰਣਾਂ ਅਤੇ ਹੋਰ ਜਾਣਕਾਰੀ ਵਾਲਾ ਹੈ. ਵਿਅਕਤੀਗਤ ਭਾਸ਼ਾ ਦੇ ਕਾਰਜਾਂ, ਤਰੀਕਿਆਂ ਆਦਿ ਬਾਰੇ ਡੂੰਘਾਈ ਨਾਲ ਜਾਣਕਾਰੀ ਪ੍ਰਾਪਤ ਕਰਨਾ ਬਹੁਤ ਵਧੀਆ ਹੈ.

<<<<<<< HEAD
ਕੋਈ ਇਸ ਨੂੰ <https://developer.mozilla.org/en-US/docs/Web/JavaScript/References> 'ਤੇ ਲੱਭ ਸਕਦਾ ਹੈ.

ਹਾਲਾਂਕਿ, ਇਸ ਦੀ ਬਜਾਏ ਇੰਟਰਨੈਟ ਦੀ ਵਰਤੋਂ ਕਰਨਾ ਅਕਸਰ ਵਧੀਆ ਹੁੰਦਾ ਹੈ. ਸਰਚ ਵਿੱਚ ਸਿਰਫ "ਐਮਡੀਐਨ + [ਸ਼ਬਦ]" ਦੀ ਵਰਤੋਂ ਕਰੋ, ਉਦਾ. <https://google.com/search?q=MDN+parseInt> `parseInt` ਫੰਕਸ਼ਨ ਦੀ ਭਾਲ ਕਰਨ ਲਈ.
Expand All@@ -26,16 +39,30 @@
- ** ਐਮਐਸਡੀਐਨ ** - ਬਹੁਤ ਸਾਰੀ ਜਾਣਕਾਰੀ ਵਾਲਾ ਮਾਈਕ੍ਰੋਸਾੱਫਟ ਮੈਨੂਅਲ, ਜਿਸ ਵਿੱਚ ਜਾਵਾ ਸਕ੍ਰਿਪਟ (ਅਕਸਰ JScript ਵਜੋਂ ਜਾਣਿਆ ਜਾਂਦਾ ਹੈ) ਵੀ ਸ਼ਾਮਲ ਹੈ. ਜੇ ਕਿਸੇ ਨੂੰ ਇੰਟਰਨੈਟ ਐਕਸਪਲੋਰਰ ਲਈ ਕੁਝ ਖਾਸ ਦੀ ਜ਼ਰੂਰਤ ਹੈ, ਤਾਂ ਬਿਹਤਰ ਉਥੇ ਜਾਓ: <http://msdn.microsoft.com/>.

ਇਸ ਦੇ ਨਾਲ, ਅਸੀਂ "ਰੇਜੀਐਕਸਐਕਸ ਐਮਐਸਡੀਐਨ" ਜਾਂ "ਰੈਗੈਕਸ ਐਕਸਪ੍ਰੈਸ ਐਮਐਸਡੀਐਨ js ਸਕ੍ਰਿਪਟ" ਵਰਗੇ ਵਾਕਾਂ ਨਾਲ ਇੱਕ ਇੰਟਰਨੈਟ ਖੋਜ ਦੀ ਵਰਤੋਂ ਕਰ ਸਕਦੇ ਹਾਂ.
=======
- **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.
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b

## ਅਨੁਕੂਲਤਾ ਟੇਬਲ

ਜਾਵਾ ਸਕ੍ਰਿਪਟ ਇੱਕ ਵਿਕਾਸਸ਼ੀਲ ਭਾਸ਼ਾ ਹੈ, ਨਵੀਆਂ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਨਿਯਮਿਤ ਤੌਰ ਤੇ ਸ਼ਾਮਲ ਕੀਤੀਆਂ ਜਾਂਦੀਆਂ ਹਨ.

ਬ੍ਰਾਜ਼ਰ-ਅਧਾਰਿਤ ਅਤੇ ਹੋਰ ਇੰਜਣਾਂ ਵਿਚਕਾਰ ਉਨ੍ਹਾਂ ਦਾ ਸਮਰਥਨ ਦੇਖਣ ਲਈ, ਵੇਖੋ:

<<<<<<< HEAD
- <http://caniuse.com> - ਸਮਰਥਨ ਦੀਆਂ ਪ੍ਰਤੀ-ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਟੇਬਲ, ਉਦਾ. ਇਹ ਵੇਖਣ ਲਈ ਕਿ ਕਿਹੜਾ ਇੰਜਣ ਆਧੁਨਿਕ ਕ੍ਰਿਪਟੋਗ੍ਰਾਫੀ ਫੰਕਸ਼ਨਾਂ ਦਾ ਸਮਰਥਨ ਕਰਦੇ ਹਨ: <http://caniuse.com/#feat=cryptography>.
- <https://kangax.github.io/compat-table> - ਭਾਸ਼ਾ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਅਤੇ ਇੰਜਣਾਂ ਵਾਲਾ ਇੱਕ ਟੇਬਲ ਜੋ ਉਹਨਾਂ ਦਾ ਸਮਰਥਨ ਕਰਦਾ ਹੈ ਜਾਂ ਸਮਰਥਨ ਨਹੀਂ ਕਰਦਾ.

ਇਹ ਸਾਰੇ ਸਰੋਤ ਅਸਲ-ਜੀਵਨ ਦੇ ਵਿਕਾਸ ਵਿੱਚ ਲਾਭਦਾਇਕ ਹਨ, ਕਿਉਂਕਿ ਉਨ੍ਹਾਂ ਵਿੱਚ ਭਾਸ਼ਾ ਦੇ ਵੇਰਵੇ, ਉਹਨਾਂ ਦੀ ਸਹਾਇਤਾ ਆਦਿ ਬਾਰੇ ਮਹੱਤਵਪੂਰਣ ਜਾਣਕਾਰੀ ਹੈ.
=======
- <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.
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b

ਕ੍ਰਿਪਾ ਕਰਕੇ ਉਨ੍ਹਾਂ (ਜਾਂ ਇਸ ਪੰਨੇ) ਨੂੰ ਉਨ੍ਹਾਂ ਮਾਮਲਿਆਂ ਲਈ ਯਾਦ ਰੱਖੋ ਜਦੋਂ ਤੁਹਾਨੂੰ ਕਿਸੇ ਵਿਸ਼ੇਸ਼ ਵਿਸ਼ੇਸ਼ਤਾ ਬਾਰੇ ਡੂੰਘਾਈ ਨਾਲ ਜਾਣਕਾਰੀ ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ.
24 changes: 23 additions & 1 deletion1-js/01-getting-started/3-code-editors/article.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,8 +12,13 @@

ਜੇ ਤੁਸੀਂ ਅਜੇ ਤੱਕ ਕੋਈ ਆਈਡੀਈ ਨਹੀਂ ਚੁਣਿਆ ਹੈ, ਹੇਠ ਦਿੱਤੇ ਵਿਕਲਪਾਂ 'ਤੇ ਗੌਰ ਕਰੋ:

<<<<<<< HEAD
- [ਵਿਜ਼ੂਅਲ ਸਟੂਡੀਓ ਕੋਡ] (https://code.visualstudio.com/) (ਕਰਾਸ ਪਲੇਟਫਾਰਮ, ਮੁਫਤ).
- [ਵੈਬਸਟਰਮ] (http://www.jetbrains.com/webstorm/) (ਕਰਾਸ ਪਲੇਟਫਾਰਮ, ਮੁਫਤ ਨਹੀਂ ਹੈ).
=======
- [Visual Studio Code](https://code.visualstudio.com/) (cross-platform, free).
- [WebStorm](https://www.jetbrains.com/webstorm/) (cross-platform, paid).
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b

ਵਿੰਡੋਜ਼ ਲਈ, ਇੱਥੇ "ਵਿਜ਼ੂਅਲ ਸਟੂਡੀਓ" ਵੀ ਹੈ, "ਵਿਜ਼ੂਅਲ ਸਟੂਡੀਓ ਕੋਡ" ਨਾਲ ਕੰਫਯੁਜ ਨਾ ਹੋਣਾ. "ਵਿਜ਼ੂਅਲ ਸਟੂਡੀਓ" ਇੱਕ ਪੇਡ ਅਤੇ ਸ਼ਕਤੀਸ਼ਾਲੀ ਵਿੰਡੋਜ਼-ਕੇਵਲ ਸੰਪਾਦਕ ਹੈ, ਜੋ ਕਿ ਡੋਟ ਨੈਟ ਲਈ ਅਨੁਕੂਲ ਹੈ। ਇਹ ਜਾਵਾ ਸਕ੍ਰਿਪਟ ਲਈ ਵੀ ਵਧੀਆ ਹੈ। ਇੱਥੇ ਇੱਕ ਮੁਫਤ ਸੰਸਕਰਣ [ਵਿਜ਼ੂਅਲ ਸਟੂਡੀਓ ਕਮਿਨਿਟੀ] (https://www.visualstudio.com/vs/commune/) ਵੀ ਹੈ.

Expand All@@ -29,18 +34,35 @@

ਅਭਿਆਸ ਵਿੱਚ, ਹਲਕੇ ਭਾਰ ਵਾਲੇ ਸੰਪਾਦਕਾਂ ਵਿੱਚ ਬਹੁਤ ਸਾਰੇ ਪਲੱਗਇਨ ਹੋ ਸਕਦੇ ਹਨ ਜਿਸ ਵਿੱਚ ਡਾਇਰੈਕਟਰੀ-ਪੱਧਰ ਦੇ ਸੰਟੈਕਸ ਵਿਸ਼ਲੇਸ਼ਕ ਅਤੇ ਆਟੋਮੈਟਿਕ ਪੂਰਨ ਸ਼ਾਮਲ ਹੁੰਦੇ ਹਨ, ਇਸ ਲਈ ਇੱਕ ਹਲਕੇ ਸੰਪਾਦਕ ਅਤੇ ਇੱਕ ਆਈਡੀਈ ਵਿੱਚ ਕੋਈ ਜਿਆਦਾ ਫਰਕ ਨਹੀਂ ਹੁੰਦਾ।

<<<<<<< HEAD
ਹੇਠ ਲਿਖੀਆਂ ਚੋਣਾਂ ਤੁਹਾਡੇ ਧਿਆਨ ਦੇ ਹੱਕਦਾਰ ਹਨ:

- [ਐਟਮ] (https://atom.io/) (ਕਰਾਸ ਪਲੇਟਫਾਰਮ, ਮੁਫਤ).
- [ਵਿਜ਼ੂਅਲ ਸਟੂਡੀਓ ਕੋਡ] (https://code.visualstudio.com/) (ਕਰਾਸ ਪਲੇਟਫਾਰਮ, ਮੁਫਤ).
- [ਸ੍ਰੇਸ਼ਟ ਪਾਠ] (http://www.sublimetext.com) (ਕਰਾਸ ਪਲੇਟਫਾਰਮ, ਸ਼ੇਅਰਵੇਅਰ).
- [ਨੋਟਪੈਡ ++] (https://notepad-plus-plus.org/) (ਵਿੰਡੋਜ਼, ਮੁਫਤ)
- [ਵਿਮ] (http://www.vim.org/) ਅਤੇ [ਈਮੈਕਸ] (https://www.gnu.org/software/emacs/) ਵੀ ਸ਼ਾਨਦਾਰ ਹਨ ਜੇ ਤੁਸੀਂ ਉਨ੍ਹਾਂ ਦੀ ਵਰਤੋਂ ਕਰਨਾ ਜਾਣਦੇ ਹੋ.
=======
There are many options, for instance:

- [Sublime Text](https://www.sublimetext.com/) (cross-platform, shareware).
- [Notepad++](https://notepad-plus-plus.org/) (Windows, free).
- [Vim](https://www.vim.org/) and [Emacs](https://www.gnu.org/software/emacs/) are also cool if you know how to use them.
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b

## ਆਓ ਬਹਿਸ ਨਾ ਕਰੀਏ

ਉਪਰੋਕਤ ਸੂਚੀਆਂ ਵਿਚ ਸੰਪਾਦਕ ਉਹ ਹਨ ਜੋ ਜਾਂ ਤਾਂ ਮੈਂ ਜਾਂ ਮੇਰੇ ਦੋਸਤ ਜਿਨ੍ਹਾਂ ਨੂੰ ਮੈਂ ਚੰਗੇ ਡਿਵੈਲਪਰ ਮੰਨਦਾ ਹਾਂ ਲੰਬੇ ਸਮੇਂ ਤੋਂ ਇਸਤੇਮਾਲ ਕਰ ਰਹੇ ਹਨ ਅਤੇ ਖੁਸ਼ ਹਨ।

ਸਾਡੀ ਵੱਡੀ ਦੁਨੀਆ ਵਿਚ ਹੋਰ ਮਹਾਨ ਸੰਪਾਦਕ ਹਨ. ਕਿਰਪਾ ਕਰਕੇ ਉਸ ਨੂੰ ਚੁਣੋ ਜਿਸ ਨੂੰ ਤੁਸੀਂ ਸਭ ਤੋਂ ਵੱਧ ਪਸੰਦ ਕਰਦੇ ਹੋ.

ਕਿਸੇ ਸੰਦ ਦੀ ਤਰ੍ਹਾਂ ਸੰਪਾਦਕ ਦੀ ਚੋਣ ਵਿਅਕਤੀਗਤ ਹੈ ਅਤੇ ਤੁਹਾਡੇ ਪ੍ਰੋਜੈਕਟਾਂ, ਆਦਤਾਂ ਅਤੇ ਵਿਅਕਤੀਗਤ ਪਸੰਦਾਂ ਤੇ ਨਿਰਭਰ ਕਰਦੀ ਹੈ.
<<<<<<< HEAD
ਕਿਸੇ ਸੰਦ ਦੀ ਤਰ੍ਹਾਂ ਸੰਪਾਦਕ ਦੀ ਚੋਣ ਵਿਅਕਤੀਗਤ ਹੈ ਅਤੇ ਤੁਹਾਡੇ ਪ੍ਰੋਜੈਕਟਾਂ, ਆਦਤਾਂ ਅਤੇ ਵਿਅਕਤੀਗਤ ਪਸੰਦਾਂ ਤੇ ਨਿਰਭਰ ਕਰਦੀ ਹੈ.
=======
The choice of an editor, like any other tool, is individual and depends on your projects, habits, and personal preferences.

The author's personal opinion:

- I'd use [Visual Studio Code](https://code.visualstudio.com/) if I develop mostly frontend.
- Otherwise, if it's mostly another language/platform and partially frontend, then consider other editors, such as XCode (Mac), Visual Studio (Windows) or Jetbrains family (Webstorm, PHPStorm, RubyMine etc, depending on the language).
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b
8 changes: 8 additions & 0 deletions1-js/01-getting-started/4-devtools/article.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,11 @@

ਇਹ ਕੁਝ ਇਸ ਤਰਾਂ ਦਿਸਦਾ ਹੈ:

<<<<<<< HEAD
! [ਕਰੋਮ] (chrome.png)
=======
![chrome](chrome.webp)
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b

ਡਿਵੈਲਪਰ ਸਾਧਨਾਂ ਦੀ ਸਹੀ ਦਿੱਖ ਤੁਹਾਡੇ ਕ੍ਰੋਮ ਦੇ ਸੰਸਕਰਣ 'ਤੇ ਨਿਰਭਰ ਕਰਦੀ ਹੈ. ਇਹ ਸਮੇਂ ਸਮੇਂ ਤੇ ਬਦਲਦਾ ਹੈ ਪਰ ਇਕੋ ਜਿਹਾ ਹੋਣਾ ਚਾਹੀਦਾ ਹੈ.

Expand All@@ -49,7 +53,11 @@

ਸਫਾਰੀ (ਮੈਕ ਬਰਾਜ਼ਰ, ਵਿੰਡੋਜ਼ / ਲੀਨਕਸ ਕੋਮਪੇਟੀਬਲ ਨਹੀਂ ਹੈ) ਵਿੱਚ ਥੋੜਾ ਜਿਹਾ ਬਦਲਾਵ ਹੈ. ਸਾਨੂੰ ਪਹਿਲਾਂ "ਡਿਵੈਲਪ ਮੇਨੂ" ਨੂੰ ਸਮਰੱਥ ਕਰਨ ਦੀ ਲੋੜ ਹੈ.

<<<<<<< HEAD
Preference ਖੋਲ੍ਹੋ ਅਤੇ Advanced ਬਾਹੀ ਤੇ ਜਾਓ. ਹੇਠਾਂ ਇਕ ਚੈੱਕਬਾਕਸ ਹੈ:
=======
Open Settings and go to the "Advanced" pane. There's a checkbox at the bottom:
>>>>>>> 540d753e90789205fc6e75c502f68382c87dea9b

! [ਸਫਾਰੀ] (safari.png)

Expand Down
Binary file removed1-js/01-getting-started/4-devtools/chrome.png
View file
Open in desktop
Binary file not shown.
View file
Open in desktop
Binary file not shown.
View file
Open in desktop
Binary file not shown.
Binary file removed1-js/01-getting-started/4-devtools/chrome@2x.png
View file
Open in desktop
Binary file not shown.
Binary file modified1-js/01-getting-started/4-devtools/safari.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified1-js/01-getting-started/4-devtools/safari@2x.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions1-js/02-first-steps/01-hello-world/1-hello-alert/index.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>

<body>

<script>
alert("I'm JavaScript!");
</script>

</body>

</html>
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@

[html src="index.html"]
8 changes: 4 additions & 4 deletions1-js/02-first-steps/01-hello-world/article.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,7 +9,7 @@ So first, let's see how we attach a script to a webpage. For server-side environ

## The "script" tag

JavaScript programs can be insertedinto any part ofan HTML documentwith the help of the `<script>` tag.
JavaScript programs can be insertedalmost anywhere intoan HTML documentusing the `<script>` tag.

For instance:

Expand DownExpand Up@@ -46,7 +46,7 @@ The `<script>` tag contains JavaScript code which is automatically executed when
The `<script>` tag has a few attributes that are rarely used nowadays but can still be found in old code:

The `type` attribute: <code>&lt;script <u>type</u>=...&gt;</code>
: The old HTML standard, HTML4, required a script to have a `type`. Usually it was `type="text/javascript"`. It's not required anymore. Also, the modern HTML standard totally changed the meaning of this attribute. Now, it can be used for JavaScript modules. But that's an advanced topic; we'll talk about modules in another part of the tutorial.
: The old HTML standard, HTML4, required a script to have a `type`. Usually it was `type="text/javascript"`. It's not required anymore. Also, the modern HTML standard totally changed the meaning of this attribute. Now, it can be used for JavaScript modules. But that's an advanced topic, we'll talk about modules in another part of the tutorial.

The `language` attribute: <code>&lt;script <u>language</u>=...&gt;</code>
: 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.
Expand All@@ -73,12 +73,12 @@ Script files are attached to HTML with the `src` attribute:
<script src="/path/to/script.js"></script>
```

Here, `/path/to/script.js` is an absolute path to the script from the site root. One can also provide a relative path from the current page. For instance, `src="script.js"` would mean a file `"script.js"` in the current folder.
Here, `/path/to/script.js` is an absolute path to the script from the site root. One can also provide a relative path from the current page. For instance, `src="script.js"`, just like `src="./script.js"`, would mean a file `"script.js"` in the current folder.

We can give a full URL as well. For instance:

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.2.0/lodash.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js"></script>
```

To attach several scripts, use multiple tags:
Expand Down
36 changes: 16 additions & 20 deletions1-js/02-first-steps/02-structure/article.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -46,7 +46,7 @@ alert(3 +
+ 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", sothe semicolonis not required. And in this case that works as intended.
The code outputs `6` because JavaScript does not insert semicolons here. It is intuitively obvious that if the line ends with a plus `"+"`, then it is an "incomplete expression", soa semicolonthere 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.**

Expand All@@ -56,40 +56,36 @@ Errors which occur in such cases are quite hard to find and fix.
If you're curious to see a concrete example of such an error, check this code out:

```js run
[1, 2].forEach(alert)
alert("Hello");

[1, 2].forEach(alert);
```

No need to think about the meaning of the brackets `[]` and `forEach` yet. We'll study them later. For now, just remember the result of the code: it shows `1` then `2`.
No need to think about the meaning of the brackets `[]` and `forEach` yet. We'll study them later. For now, just remember the result ofrunningthe code: it shows `Hello`, then `1`, then `2`.

Now, let'sadd an `alert` before thecode and *not* finish it with a semicolon:
Now let'sremove the semicolon after the`alert`:

```js run no-beautify
alert("There will be an error")
alert("Hello")

[1, 2].forEach(alert)
[1, 2].forEach(alert);
```

Now if we run the code, only the first `alert` is shown and then we have an error!

But everything is fine again if we add a semicolon after `alert`:
```js run
alert("All fine now");
The difference compared to the code above is only one character: the semicolon at the end of the first line is gone.

[1, 2].forEach(alert)
```
If we run this code, only the first `Hello` shows (and there's an error, you may need to open the console to see it). There are no numbers any more.

Now we have the "All fine now" message followed by `1` and `2`.
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.


The error in the no-semicolon variant occurs because JavaScript does not assume a semicolon before square brackets `[...]`.

So, because the semicolon is not auto-inserted, the code in the first example is treated as a single statement. Here's how the engine sees it:
Here's how the engine sees it:

```js run no-beautify
alert("There will be an error")[1, 2].forEach(alert)
alert("Hello")[1, 2].forEach(alert);
```

But it should be two separate statements, not one. Such a merging in this case is just wrong, hence the error. This can happen in other situations.
Looks weird, right? Such merging in this case is just wrong. We need to put a semicolon after `alert` for the code to work correctly.

This can happen in other situations also.
````

We recommend putting semicolons between statements even if they are separated by newlines. This rule is widely adopted by the community. Let's note once again -- *it is possible* to leave out semicolons most of the time. But it's safer -- especially for a beginner -- to use them.
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp