0 ratings 0% found this document useful (0 votes) 9 views 6 pages JS
The document discusses TypeScript (TS), a programming language created by Brendan Eich in 1495, which is a superset of JavaScript designed for both front-end and back-end development. It highlights features such as static typing, asynchronous execution, and the ability to run in browsers and Node.js. Additionally, it covers variable scopes, hoisting, and the syntax rules for writing TypeScript code.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here .
Available Formats
Download as PDF or read online on Scribd
Go to previous items Go to next items
+ Darya Senpit
dove. Senipt is a Niph-leuel, infeyrpreted progrrasnmninyg Boi
Fathen of Java Suipt > Brandon étch in the year of 1495,
Nome of TS1- Mocha > Live Script > Java Sexipt .
%) Feotunos of TS t= > dewel
> we, Coun candle” Gmmaiuic uch es.
aoe Aynchronoius in mature «(Line by bine. execution),
7? Tt hau aingle callitaek for exeerction »
> TS wv foo, typed «
7 OTS 16 a dyramte. 2. ae
> TS is euert dhiven(preuide functionality to » patignon) Me
TS ta uted for both front-end and back-end development:
7% Uke con wun TS inaide. the browaen using Tse ine (v3)
and outside. the browser by using node. gs i
Plunpose. oh Tayo Smiptix. HTML oad CSS, ate can deuelop |
Adakic. tucbpages » To Prrowide.’ Hoctionality fon the. dation wth
ee eS fore Tava Script.
*) Static Web PAPA S= These. pages are. moe infenactius. on mepondive
to the usu €x- help page
9 Dyrowie Web papesi= These weh pages anc. wtoactiue. on
Taaponaius. to the urey based the User imped
7 Historp of Tava Senipt | musnted by Brenden
teh in the 19: f
“Moche!.Browser
TS Engine
om Taterp)
TIT Fi
Compiler
AST > Abatraet Symtooc ‘@s5t's)
Tree.
format- =
(Source, code) *aS
eit alion
Vo
a. a
Gutped | es.
Peurlopens will comite. Joan Seaist code warg VS code and
| mace File with ear soa tail he, kn
the form of fatwntadel Foremat tic is alro
I tld on Source eo © Te conwert huvan readable
f format vito Rear rear ie aecisvee Dt dalale fonnut cue wilt
fors brrowacn. fach ound brrewaen has Tova Sou,
be ea ay pt
Sroonple. = Chrome V8, Mozilla finefon> tae Monkey
Saori —>. Cone TS) Trench
anaere & stoke vps Fue. and tt tail
wat apes lr 3h np ciourctend
ue tk coil Hough Comps Pr, Creme; if uno
wtiolation in Aaprtar & als: pte ite ic 7.
| 1 Ababnact Syrtax Tree, SDE AST will represent
Armuchune of Code,» Tt ia a iwlemediate
ae a logit fw of taa Profiler ‘- profiler will keep tack of exseaction to idescify
anens fon code. optimization:
ETI Congilen' Sut Tr Teme. Compiler one :
TIT Rain will fake optimized code. ovd it till one
wachine undtrtturdable fomnet. Those machine, ee ie
ble code (binary baw tage Code) cil be given as imps
amd 06 will gee the output.
© Hows wang war to write, Ts?
77 Mle can write TS in too tongs — il Trlrnal JS, iil Odeal 1
Beater US sl henene cote ti aexseal oS) boty eae lection a4
twell no body Acction, hy ding aeript tag.
Be - Ghody>
; (seript)
LrTeERALS {= Literals one the values. Tn Jiterals use have
eae r tyme <
V Nuonber/letowls, i] String Literals (1), % >)
ere ier Truc. iv] Null 4 Undefined
‘8 Boolean Lites ee 1
+) SCPERATORSS. Sepemterra aneaed +e aaperate tnt, dale
ears, blocks and expreaaions by using 44,01,
Gee th Oy crknstly) bie ea.
+> OPERATORS I= Operetorm ane. the. predefined aynibola thich
| Us used fo ponfpon some. operons om the cperanda, :
“as ae > .I 4 Sed
i] Muiline. conmertty— represented by Je —*/ 7
~ZVaniableat=
Yontable ia, vaned of memory Joeation which iswued fo store. peme.
ata iw be changed ‘nt’ wenrher of tinea dcr
“Te decline. variables in Ts, we. hae, three. key toomds —
i) Vans 8] Lek ead il Cont ¢
Paleo var identi O/ fet idertifien Jeet identifier;
2 Difference. Hosen re
fet $ Cont
Topic.
“Stopes of Vorighles i
Ule, bore tyres. Atopen in seope oR voriahlea —
y bloek Acope , ul function Acope , Ui] Global se tee ad
Jock Scopes Ary voniable. wich is declined bu
7 8 Scope. ented 3 Blk Acope’. ee a
+ > Ary voniable which iA decdoned hy using. ‘var 1,
taunot aececa Owtnide. the block.
vor a= 40; Console. fog Ca, b,c) 4 40, 20,20
fet b= 20; Comsche Log (a) tow
comk C= 32; Oomante, hog (b) f] 20 x
i : tonsole: to N20)
D Function Stope tpn : eeuOE
Example.» funetion add OF conacle fog. (ar by) [errr
ee 197 | console tagl a) erie
fect b = 20, easel erron
sha rice 0; aaa herrea
A Global Seope t= ay variable whieh is declared outside.
the function ia called as iplebol aepe tn
7 AML tee. venialtes which is dedared oudaide é
trp Ate. scope « oe
7 le can aceens the vaniahles in all Cee:
Sampler — yar a= 10; nection privet
fat b= 20; A rhslaeleg (bos
Conat C= 30;
printvolues O 7 10,20, 30
=tHorstInG In ihe
Hoisting in a default behouiour of Tava Svipt: voriahle delanation
mour. its top of the Aeope io called ao ‘hoisting!
We eam achieue hoiating Using ‘vor! keyword eee
ia a global variable axel it has default valuc. of ‘undefined’
We aunt achiore hoisting buy uaing Set’ anc ‘exnat’ because
fet ¢ conk isa local variable: pan:
TP ue. try to hoist fet and eonat, cae ge oudpuct as toneaueaht
F refeonce, Reno, which is alo called as THZ’.
> Temporiany Dead Zone. (78) $=
gl be ake cait Tt isa tme gap betuteen
a, Peal sor abatement on) usilization of
the can achiowe. TD
athieue TOE hy ua 2
Te AE sch an i
siete: UR Cant