Okokuqala, yintoni iJavaScript? Ushicilelo lweJava lulwimi lwenkqubo olusetyenziswa ukufikelela kwizicelo ezahlukeneyo. Iscript yeJava yenye yezona lwimi zidumileyo zokucwangcisa, kwaye ukuthandwa kwayo kukhula kuphela. Ukuba ungathanda ukufunda ngakumbi malunga nokuba kutheni iJava Script ifumana ukuthandwa kwaye kufanelekile na ukufunda iJS ngo-2022, jonga iinyani ezingezantsi.
- Ulwazi olusisiseko malunga ne-JS ekufuneka uyazi ngaphambi kokuba uqale ukufunda ulwimi lwenkqubo yeJavaScript
- Kutheni iJavaScript ithandwa kakhulu kwaye ifanelwe ukuthandwa kwayo?
- Kutheni kufuneka ufunde iJavaScript
- Ngawaphi amathemba olwimi
- Ngaba kuya kubakho imfuno yabaqulunqi benkqubo be-JS kwixesha elizayo
- I-JavaScript eluncedo kunye neengxaki
- Uphuhliso lomdlalo weJavaScript
- Kutheni usiba nguMphuhlisi we-JS ngo-2022-Kutheni kufuneka ufunde iJavaScript, iimbono
- Iirobhothi zokurhweba kunye nezicwangciso kwiJavaScript
Ulwazi olusisiseko malunga ne-JS ekufuneka uyazi ngaphambi kokuba uqale ukufunda ulwimi lwenkqubo yeJavaScript
IJavaScript lulwimi lwenkqubo olukwinqanaba eliphezulu oluxhasa iindlela ezininzi ezahlukeneyo. Ibhekisa kwiqela leelwimi ezitolikiweyo. Yintoni iJavaScript ebandakanya:
- Ixabiso lolwazi lichongwa ngokubala ixabiso lesigxina, okanye i-hypotenuse.
- Ikhowudi yeprogram okanye isicelo ibonakaliswe xa ifunyenwe.
- Imisebenzi yeskripthi seJava inokwabelwa njengeminye imisebenzi eyahlukileyo kwezinye iifayile, ungabelana ngazo.
- Ngenxa yokuxhaphaka okuphezulu kweJavascript, ixhaswa yinani elikhulu leephequluli.
I-ES6 lulongezo olutsha kwiJavaScript eyandisa ukusebenza kwayo. Yongeza inkxaso yomsebenzi we-arrow syntax, ukukhulula, ukusasazeka kunye nokuphumla kwabaqhubi, iimodyuli, kunye neeklasi.
IJavaScript ixhaphakile kwaye iyathandwa, uninzi lwabantu luye lwenzeka ngeenxa zonke kuyo, enika abaphuhlisi ukufikelela kwizixhobo ezongezelelweyo, ezinje:
- Amathala eencwadi kunye neziseko.
- Abaqokeleli.
- Amathala eencwadi ancedisayo.
- Iijenereyitha zesiza esingatshintshiyo.
Kwakhona JS:
- ikuvumela ukuba wenze iinkqubo zangoku zangaphambili usebenzisa iReact, Angular kunye neVue;
- usebenzisa iReact Native ukwenza usetyenziso lweqonga elinqamlezileyo;
- imidlalo emininzi ibhalwe nge-JS;
- iirobhothi zokurhweba zibhalwe kwiJavaScript.
Kutheni iJavaScript ithandwa kakhulu kwaye ifanelwe ukuthandwa kwayo?
Njengoko kukhankanyiwe ngaphambili, iJavascript ibeka njengenye yeelwimi ezidumileyo zeprogram, zombini ngokwenani lokusetyenziswa kunye neeprojekthi ezenziwe kuyo, kunye nokuphindaphinda kwezicelo.
IJava lukhetho olukhulu lwabaqalisi benkqubo ukuba bangene kuphuhliso. Iinkampani kwiRussian Federation zithatha abaqalayo ukuya kwizitudiyo zabo zewebhu. Izitudiyo zifumaneka kwizixeko ezikhulu nakwiingingqi.
Izinto eziluncedo zeJavaScript, eziphawulwa ziingcali:
- I-plus yokuqala ye-JS yi -flexibility ye-JS , ekuvumela ukuba wenze izicelo, okanye iisayithi ezinokusebenzisana okukhulu.
- Into yesibini ekufuneka uyibeke ingqalelo kuphuhliso lwezicelo zewebhu , okwangoku zifumana ukuthandwa. Olu phuhliso ngoku lulandelwa ngamandla nguGoogle. Kodwa ngoku i-PWA ifumana ukuthandwa, okunokuthi kwixesha elizayo ibambe imakethi. I-PWA iphuhliswe kusetyenziswa iJavaScript.
Kwaye nalu uluvo, oluthathwe ku-https://habr.com/:
Ngawaphi amathemba olwimi
I-JS yenye yezona lwimi zifunwa kakhulu kwihlabathi. Ngokwenkonzo ye-TIOB, ikwindawo yesixhenxe. Kwi-GitHub, ulwimi lukwindawo yokuqala. Lulwimi lwesibini olukhethwayo emva kwePython. Konke oku kungqina ukuba ulwimi lunamathemba amakhulu. Ulwimi lwenkqubo yeJavaScript – yintoni ebhaliweyo kuyo, indlela yokuyifunda, bahlawula malini ngayo: https://youtu.be/a76uc2FP4yE
Ngaba kuya kubakho imfuno yabaqulunqi benkqubo be-JS kwixesha elizayo
Kuphuhliso lojongano lwewebhu, izicelo azinakwenza ngaphandle kwe-JS. Ngoko ke, ukuthandwa kwayo kuya kwanda. Ngokwezibikezelo, kwiminyaka eyi-10 ezayo ngokuqinisekileyo iya kuba yimfuno.
I-JavaScript eluncedo kunye neengxaki
Ke, ngaba iJS idume ngokufanelekileyo? IiPros:
- Ukusetyenziswa kuphuhliso lwewebhu – i-JS sisixhobo esiyimfuneko esinayo yonke imisebenzi efanelekileyo, izikhokelo, amathala eencwadi.
- Isantya kunye nokusebenza -isantya esiphezulu sokusebenza kwezicelo ezivela kwiindawo kunika inzuzo enkulu kolu lwimi. Kwakhona uyayazi indlela yokuqhuba inxalenye yesicelo ngaphandle kokudala izicelo kumncedisi.
- I- ecosystem enkulu – inani lamacandelo enziwe ngumsebenzisi liye landa kakhulu kwaye sele likhona ukuze lisetyenziswe ngaphandle kwezithintelo.
- Ukusetyenziswa ngokulula – inani elikhulu lezixhobo ezidalwe ukuququzelela umsebenzi wabasebenzisi, kunye ne-interface elula, yenza iJavascript ibe lula kakhulu.
- Kwakhona kufuneka kubalelwe kwii-pluses ukufunda ngokukhawuleza kunye nokuqhelana nolwimi .
Njengalo naluphi na olunye ulwimi, i-JS ayifezekanga – iSikripthi seJava sikwanazo nezingeloncedo:
- Ukunqongophala kokufunda kunye nokukhuphela iifayile.
- “Ukuxolelwa kweempazamo” – oku yinyaniso yokuba ulwimi ludlula iintsilelo kwaye alubabalalisi, lubhala kwakhona idatha ethile ngokwengcamango yayo. Konke oku kutyhilwa sele kwinqanaba lomsebenzi kunye nokulungiswa kweempazamo.
- Ukunqongophala kwenkxaso yokufikelela kude.
- Ifikeleleka lula kubangeneleli. Ngenxa yokufikeleleka kolwimi, akukho nzima ukufaka ikhowudi enobungozi kuyo eyenzakalisa abasebenzisi.
Nangona kunjalo, abo basebenzisa ulwimi rhoqo baluphucula kwiilwimi zabo. uluntu lwabasebenzisi. Abakhangeli bayaphucuka kunye nomsebenzi we-JS.
Uphuhliso lomdlalo weJavaScript
Uninzi lwabantu lucinga ukuba basebenzisa i-injini ye-C ++ ukwenza imidlalo epholileyo. Oku kunokubizwa ngokuba yinyani, kodwa akuphelelanga, kuba abadwelisi beelwimi ezahlukeneyo bathatha inxaxheba kuphuhliso lomdlalo. IJavaScript ayikho ngaphandle koku. Unokwenza imidlalo kwiJavascript, elula kwaye entsonkothileyo. Kuzo zombini iimeko, iteknoloji yeCanvas isetyenziswa, eyenza ikhowudi kwi-HTML5. Iphepha le-HTML lisetyenziselwa ukuseta ithegi ye-canvas kunye nokudibanisa i-JS, apho wonke umsebenzi wenziwa khona. I-id yekhanvasi efunekayo ikhangelwe kwifayile yeJava kwaye indlela yokusebenza nayo ikhethiwe. Apha kwachazwa amanqanaba okuqala ngaphambi kokuqhubeka nokudalwa komdlalo ngokwawo. Malunga nemidlalo embalwa edumileyo yeJavaScript:
- OnOff – kulo mdlalo kufuneka uzise umlinganiswa kumgca wokugqibela ngokudlula imiqobo eyahlukeneyo kunye neengozi ngendlela yeebhola ezikhatywayo kunye nemingxuma. Ngomgangatho ngamnye ogqityiweyo, uya kungena idimension entsha. Umdlalo unamanqanaba angama-25 kwaye kunokwenzeka ukuba wenze owakho.
- I- Underrun ngumdlalo onobugcisa obuhle kakhulu be-pixel kunye nemiphumo emihle yesandi. Emdlalweni, kufuneka ufike elabhoratri ngokudubula iintshaba eziguqukayo. Kufuneka ufike apho ukuze uqalise kwakhona iinkqubo zelebhu.
- ISuper Chrono Portal Maker -umdlalo yiSuper Mario yoqobo, apho kuya kufuneka udlule kumanqanaba okoyisa imiqobo kunye neentshaba. Inqanaba elitsha ngalinye, apho kukho ama-30 kumdlalo, longeza ubuchwephesha obutsha kunye nokusebenza. Kukho umyili wezinga.
- I- Offline Paradice ngumdlalo okhawulezayo apho umceli mngeni ikukutsiba, ubaleke kwaye wophule imiqobo. I-FPS kumdlalo ihlala igcinwe kwinqanaba eliphezulu ngokufanelekileyo, kwaye inqaku logcino oluzenzekelayo liya kukunceda ugcine inkqubela yakho. Umdlalo uya kukhatshwa ngumculo omnandi, imvelaphi emnandi kunye noopopayi abalungileyo.
- IRaven ngumdlalo wepuzzle apho kufuneka ulungise iikhamera ukuze uhlole izidalwa ezingaqondakaliyo eziyingozi ebumnyameni. Hlala ubajongile ukuze bangakubulala.
Yimidlalo embalwa eyenziwe ngolu lwimi echazwe apha. Enyanisweni, zininzi ngakumbi.
Kutheni usiba nguMphuhlisi we-JS ngo-2022-Kutheni kufuneka ufunde iJavaScript, iimbono
Ukuba awukakwazi ukuphendula lo mbuzo emva kokufunda konke okungasentla, eli candelo lelakho. Izizathu zokuba kutheni i-JS ibe sisicwangciso sokufunda esithembisayo sika-2022:
- Olu lwimi luxhaphake kakhulu. Ayidumi kuphela phakathi kwabaqalayo, kodwa naphakathi kweengcali.
- Uluntu olukhulu lwe-JS. Ulwimi ludumile ngesizathu-inani elikhulu lokuphuculwa komsebenzi ofanelekileyo kunye nalo lwenziwa ngabasebenzisi bolu lwimi. Umzekelo: npm ngoyena mphathi wepakethe omkhulu. Ukongeza, zininzi izikhokelo zeJava kwiwebhu ukukunceda ukuba uqalise.
- IJava lulwimi lwebhrawuza. Ewe kunjalo, kukho i-analogue yayo ye-WASM, kodwa ayilunganga ngokwaneleyo ukudlula iJava kungekudala. IJava ibalulekile kubaphuhlisi bewebhu.
- Isantya kunye nokusebenza kakuhle. Uninzi lweendawo ezidumileyo zisekelwe kwiJava, enenzuzo kakhulu kubo. Zinesantya esiphezulu kunye nokusebenza, zibiza ngaphantsi kubanikazi bazo, kwaye zenziwe kwaye ziqhube ngokukhawuleza.
Iirobhothi zokurhweba kunye nezicwangciso kwiJavaScript
Kuyafaneleka ukuba uqaphele ukuba iJava ayisetyenziswanga kuphela ekuphuhliseni iiwebhusayithi kunye nemidlalo, kodwa kunye nokuqalisa
iirobhothi zokurhweba . Ukwenza oku, iJava Script inayo yonke into oyifunayo:
- Iimpawu zobuchwephesha ezinokufumaneka kwindawo yoluntu.
- Ithala leencwadi laseTinkoff utyalo-mali-openapi-js-sdk.
- Ngoku makhe sithathe iqhinga eligqityiweyo njengethempleyithi yolunye utshintsho lwethu. Ithemplate iya kuba yinkqubo elula ye-2 SMA.
- Masilisebenzise ngokupheleleyo iqhinga. Kule nto, i-genetics iya kusetyenziswa. Ukwenza oku, udinga ilayibrari ye-geneticalgorithm.
Umendo womphuhlisi unzima kwaye unameva[/ caption] Ukusebenzisa iSikripthi seJava kunye namathala eencwadi ahambelanayo kunye nezicwangciso, nokuba umdwebi weprogram yeJunior JS unokubhala i-robot elula yokurhweba, ukuyilungisa endleleni. Iinuances ezininzi ezifuna ukuphuculwa zivele kunye notshintsho kwimarike. Emva kokuba isicwangciso siphuculwe ngokwefomula: Ulindelo lwezibalo = Ukuba nokwenzeka kwenzuzo x I-avareji yenzuzo – Ukubakho kwelahleko x Umyinge welahleko. Okulandelayo kuza umsebenzi kunye nekhowudi apho i-interface yenziwe ngayo. I-interface iya kuzaliswa ukwenzela ukuseta iiparameters apho i-algorithm iya kusebenza. Kwimeko yokukhetha ukwenza irobhothi yokurhweba usebenzisa i-genetics, kufuneka ubaleke kwaye ugcwalise iikhowudi ezininzi zale robhothi kwaye uqale ukuzivavanya, emva koko, ukuchonga iziphene zabo, dibanisa ezona ziphumeleleyo kwaye ungakwenza oku kaninzi njengoko uthanda, isiphumo ngasinye esilandelayo siya kumelana nomsebenzi wawo ngcono nangcono, sikhetha i parameters ye fastSMAPeriod kunye namaxesha acothayoSMAPeriod, kunye nokumisa kwaye kuthatha. Ngeli zinga, unokwenza inkqubo yokurhweba eya kusebenza kwiimarike. IJavaScript yenza oku kakuhle kakhulu. Kutheni i-Javascript ithandwa kakhulu, kuyafaneleka ukufunda ulwimi lweprogram ye-JS: https://youtu.be/3kV1ZVM3KGU Kule nqaku, ufunde malunga neempawu ze-JS, iingenelo kunye nokungalunganga. kunye neenyawo kunye nemisila. Ngeli zinga, unokwenza inkqubo yokurhweba eya kusebenza kwiimarike. IJavaScript yenza oku kakuhle kakhulu. Kutheni i-Javascript ithandwa kakhulu, kuyafaneleka ukufunda ulwimi lweprogram ye-JS: https://youtu.be/3kV1ZVM3KGU Kule nqaku, ufunde malunga neempawu ze-JS, iingenelo kunye nokungalunganga. kunye neenyawo kunye nemisila. Ngeli zinga, unokwenza inkqubo yokurhweba eya kusebenza kwiimarike. IJavaScript yenza oku kakuhle kakhulu. Kutheni i-Javascript ithandwa kakhulu, kuyafaneleka ukufunda ulwimi lweprogram ye-JS: https://youtu.be/3kV1ZVM3KGU Kule nqaku, ufunde malunga neempawu ze-JS, iingenelo kunye nokungalunganga.
IJavaScript ngumphefumlo wendawo [/ caption] Ngoku unokugqiba ikamva lakho ukuba uqala inkqubo ngolu lwimi, kwaye emva kokufunda amathemba ayo kunye nokuba ingakanani imfuno, ikamva lakho liya kuba yimpumelelo kakhulu, kwaye italente yokucwangcisa iya kuba yimpumelelo. kwimfuno.