Es6 hauv node JS yog dab tsi?
Es6 hauv node JS yog dab tsi?

Video: Es6 hauv node JS yog dab tsi?

Video: Es6 hauv node JS yog dab tsi?
Video: Qhia website bootstrap4 section part26 2024, Hlis ntuj nqeg
Anonim

ES 6 (ECMAScript 2015) yog qhov tseeb ruaj khov version ntawm JavaScript. Babel yog ib tug compiler uas tso cai rau peb sau ES 6 nta hauv JavaScript thiab khiav nws hauv cov laus / uas twb muaj lawm cav. Yuav teeb Babel nrog koj li cas Node . js App. Koj yuav tsum muaj qhov tseeb node.

Ntawm no, cov node js siv es6?

ECMAScript 2015 ( ES 6 ) thiab tshaj. Node . js yog tsim tawm tsam niaj hnub versions ntawm V8. Los ntawm kev ua raws li cov kev tshaj tawm tshiab ntawm lub cav no, peb xyuas kom meej cov yam ntxwv tshiab ntawm JavaScript ECMA-262 specification raug coj mus rau Node.

Ib sab saum toj, yog xav tau es6? Tshwj xeeb, vim ES 6 modules yog loaded, daws thiab ntsuam xyuas asynchronously, nws yuav tsis tau xav tau () ib ES 6 module. Qhov laj thawj yog vim li cas xav tau () yog ib qho kev ua haujlwm siab synchronous.

Kuj kom paub yog, dab tsi version ntawm JS node siv?

Node siv Chrome V8 JavaScript cav js hauv theem. Node siv Google's V8 JavaScript cav rau kev siv lus. Cov lus tshiab muaj nyob hauv Node nyob ntawm seb lawv tau ua ntej hauv V8. Qhov project V8 thawb mus tom ntej tsis tu ncua thiab pab pawg tau tshaj tawm qhov tshiab version kwv yees txhua txhua rau lub lis piam.

ECMA sawv cev rau dab tsi?

European Computer Manufacturers Association

Pom zoo: