0 ratings0% found this document useful (0 votes) 45 views52 pagesMCA Css Capter 1
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
ewe [cee]
Youva
PNoth tt “Basics of TauaSeipt Peqgcaromiry.” “
441 Frokuses Seva Saigo Mayet ia
14-2 QNoiech m4 copecky mmethad , D: trax ,Mmrari
[4 Ogeca! ond esGtesstene= Primacy sek pression
object, Perey AviMialrtess. Wlanckine cle Ciaitor
| prescin: Ary express
Aoviotatt ecuprases
Th statement, iFacelse., Wp oehseit cesked AC cn
va a
Ne skakement = Coc \nop Cnt io \naé, tinh a
nite Nooo, conbinuc statement a
rely ake: Xe
ian \_actting emmeerhics ond deed 7
oes $
perk et yo gerters wd setters,ote What 1s Tawa Seripk
= Sawateript ie papular li
“Open. eS
—Gourte Client side Lang ugge = hed ~
op
by all_beio OP me —
_! fr : 2 —
isa dynam der peas fi ae ~
clacsucg lnlben= Tata Scrip nis appli cel oe <5 2
its Wir dgtuments/ cin poovide |
rclivites an uiebsi 2ove
sett Ziy “3. ty tok
leLafd. easy -to-learp programming lepetaters bop
ams / scripts | an various 4 -
snoteopecators
sich set of
ry
any
. = provid
z 350 provid
céntcol statements }o control
Ane Flow of execution of the
ode Foc ext TS provid
asi
conditional statement:
Jon result efcodditie
r
Yhem yb. ‘ i
WE CaM SKIP Or execute Setor instruchori}
{ ——
_ a a FS] Light lalejgbt:
25 prowides!|atray construct to) =
“FavaScript codes ake Very.
eos _enemary. foatpeiok for
ist Lables and _pecterm
—variou pcabions * like eearcching; |il
AD Gaipting Language. IB) Client cide scripting langucge|
Codes Wyotrace laud ipl opathee dai sTaun stiph codes. are ook. |
& durian, a geoerall executed on the Server: insted
its, dep: Assn ftace Bal ce uted Went
foe Weer ution Pe! Te igh mmackine by user's browsers
edes ole placed) pioithins=tATEL —-s_[(aieclient Lsoft-waces [trroueers)
}—Tlowa Seq ait ce seriptslexecubed on ‘cliente side ot
nok py i x meet server Side; we con.
. Sort ee sipk is. Ment
|extend. | sles» r 4 | Saqguage
to aleefidy, builk “applica tidns, As Jn * poe
Sour seli ot 36° E =
to HIP L. elements, ute coin Say =
Tes aS ‘aDirnichyoe or Object tased.
A Noon, ange n_objéct -oriénkerl-pragrammiy
icstihor |Aangilages, objects ace‘icceated |
Lok! 5:3]. retting + instance
ee cangideds Thansstel of lasses dwhereas TS.
joker piers | io Tatasec’ heat 1S _
codes \oaler BG Nine 00 SER. ool Merce Tduakeri pt aby. jee’
Armee Tahadictok A5/nnTabeiopit abe’ creaked: thy creating
wiced Noethuupye ls tin nsw instances af. protat ips
= Ba, codadces DouaSe instead. Of classes...
2 fis \JowaScripkis.aq- obj ect
ode nnd) Neen totery based Hlangudget, ib she
exccuke Soy. JauaSeni g No oByech Tieated concept
i tio_nodetm brauisers Vise" class: foheribance’, polymar
—euailohles
—Hence_tne con phism dy marie Iaindiing a
frees
post
|_ Object orien: -
y [Simulated Hheaugh the use of
Protokyors in TauaSeriph:oh,
2snaliiue.
ane
and
| tists Naaser cageltiier |
se letters! Separately! |
differently
TE ie create Hhree
—_identt€i
£5 nus NUM, Num. then |
ute comsidered@osetbr
ate a
- —might_th
- ark defi
tb idenbi fises, Beceitiset Hey
«Same spellitg bal they
ed dif ls rently using upper —
——Case_aitt
need to
—must_and| should be witiHen io lower
——tase_letbe!
worithen ij
eck
ase |
aa
Pupp
ull: be
el _lower Cake lethers | |
eee ini lower eas cHesd
Sera ast
‘itben ja uppet
Jouadcript is case
iS a
co
rhe
p_ SAT!
if Meede 4
[Longecg
65 fod which da:
2 a
ta hype.
fined
ace Manan a5 ebrichl: fel
Lo Sa tect leegucge
ost“1o) Browser Tadependenk
“Yo te Tou ipt_code browsers.
o. 1 oct te install y ch plugein
tian al ig oa os
einer aig Sfnabl: Tae eet then Wence. TS tis not
i \ wage. Le
ciphi 1 Busts co:_bmusers execute SS
secure cide Tavaserist dlea Neodk andbinx arid check
rer _Sidel TS. a seubed Vfod\malious And bacefal ceidés
on Hh. Iuec aide “Feiss Lite, condent Si ideckd
“ 1 ;
codes act executed am the Secver ba: a i
_sice, only! Mne ukion 1
MM be deat ba % uyciok fea ros ces
__enadnioe | —_______ Fe tbl gad .
eip¥ing \s wr
a
T i
t
Bo Jreseno=
\
Gosver Sia
535
othe —/\ 1 |
Nersion,
Ay
@ Th ains on Hhe uses Campuber
BWM desoad Faun Seript accused
© DWP Python Tava, Ruby are use
| © Provides mee Seewrily Var date.fe)
Mow to cortte Tau
8 Bape cnc ith coal spe
= Tawa Seri 3 rt shed AA ox
Chay inte sme ag a Sar
del tae Aes ser to” script iqg-=net_eTril_
hh
er Sprecessequt Be ph el
- cee Ay 7 Conse i ae ua) ae
Polldutag: “Ley
He Serigtls to naa eeanaeddale A gt in dnedy? secbion
A\neody badly >
42 eci Bee? cript...-? _
L J TavoSeript d Wa ipt cod
L ipt (Script
41 head. > Al eady>pielGoesipt? hag bacesballas ing —ethribul
YY Lene tad The. language “attibut: + to due
FT Tasmceript™, Ushiche Fella” Hoe browsec
BY “Wype .” Theshune attributes tells the bro: Moot th
tae . .
cgontzed sin the: format ef o JavaScript
“This_j Ae by inforchakion = to. caf
he TaugSs 4 cod
I tae |. ="JawSirip® type =" text javascript?
_de unt ibe Cello Yaoi ys)raseNes 4G
ea
Beet Moe Page ee Oe i edn
@. Explain the terme t- - Cyent
Object Name
Tesscaiph is ch std_pngtapenn —s
uecystning AS in the jects. “fd Tc
Hi Wection SOfepamedSelies and th 1 ues
are che PSobjec!
feb age septising uorios alate j_stene of Phe acc _|
ef P themb ace of otifferent |
4,
peo Vobjecky \f +
in webpage toi =
IE TeunGecinr Bupports unrinus obffcta Vike darument
= eee ee cae
Saas ko toute ho 24 t =
ipt_, objecl “cane created tsithh curly heacketsfee 16 Toe
] ee
——__[ entige copia = “Tovesri” pee “bext/ Faw cciph")
Ll Nor shud ection { ‘9
_ i \ealpests"
age tis
yar b." YPAR” i
If, : i
ip t
= Te TS_all_tnuitie- ands user defined objerts arc clescendanks_
Fant abject cestled Object “The n Meyword is used
to create / Sais: faa! abject
ipl logages “Taub Typ" dest TaxaScaigk”
No tuden Pep. Objet 9;Paseo: | :
| bs youva
[Pen peck —
by ae
a hy hue =a, fated itty an object,
i siloject has 43" oon BeR of phoperties WK sid
i sata eecound, ~ a —
~A_¢ af 1 oy 4 Lualue” Spas ee
okey Cocoperty d46 alway a ring
+ Naluell proprekgualue ener ts y datatype’, ike «Shing
nusibtss., Booleans of ake Be Suodkisa
ANd oth. objeckst is
‘ oh § .
am)|| Witte a (TS cade fo declare” omer
1 each —_—— .
LL Ld’ Wey Pen gerkss LIAL
f Ha ae cpanel Ae = Heliaagh™ 2
I sets alee ot at
L = oes Nes “Kealpedt”,,
f a ‘ ae ot“ Birst
adocuments wasik@ CT arn Mink student age bh” yee old‘).
| eccipt
head
[neal i é ‘
= r Pee are
sol a Jus
Kalpesh c
| sayrars cold ||
“To_ ab! te Cine baud Hcletlace rhies using
1 : ae a t d
_= Pissti propect 4 A a ¥
Piet
= Lea Neely is0g¢ with \ .
sthrid_puopecky is _year ith,
Ta TY te poscin, aw ses_of lojects thy.
es
so = Xe Cage) Auden age]
S\eite_o 4s code to MNushate he Use of meted
A Mnken\
L Ane
Ze? VWeddsod LI Fitle
eta 2h ip? bype =" bet [TauaSecipt’>
name 4 —“\alpeshs”
cige 321Yauco OH
[L sieplay ¢ Canckion O)_
Ea
sname)} ed
i
I. - .
Idocumedh wocik = = ntesttident.dieplay (19;
f ipt faet fon itt »
| er ands |
dy
Nady i
Te rate
{ [Nha = Kalpes
|
| + this is 0 Special Neusat»
Iocan use seas a
I Obbsect
method _-f ae
oe fe the currénh —[rene 27
4) Dot eynte : :
s
youva |
: l- One can acess ati abject So spropecties cind_onctheds by —
Hsing the dotvey, ritox_along Hh the _obbjeck -a.ame_and
ik property: metbad
c xorite_methed for aN decumment. —
Glocurnent ore Sh
- A_dor Separates HheSnbraecl- tie chjcch Crom the property.
or methed, :
= The first partis then fF the object (loca ot) acd _
oe e ec Agee
oa Ain A
Mai A
eT S,an even i
fon mau Vek, button “click e
+ TavaSecipt—eeacks ©. Nts cp.
= Puent_Handriag, 4 Aine ecuding Of cade an “ouure
|_e\
Cex Wdnen uaer click on cibmit buttoo Hae He cunt
odler Car Ahot click “event Should gricds Woe infocmalon,
= Whe Suackinns tacittten Co
Nigh ore Nos event
aduce and Vadobles
Tauueriet isa dyoomicnce loosely -}yped_la
la variable canetald value of agg datatype “ot any peint
[of clue af Meywoord ig used ho spect the da¥a tyne
Tt taal any ype c wvolule ich 1S“ uber
seri be a a : =
| foc saalk- - A
» Number ~ fl “fate: puenber is _c_numecic_ualue
Meir =20
2_SHing 2A Sting A tqueneeof Ichacackers Toat is —
coclosed within double quotation marks, —
> Vac city = YGaebinajindgar*
3) Bantetio = “false oc ter
[ie sae: Wye Hcties J 7
ey Nan Prati Values meas” ene value ck all
or on = ly. é > .
2) dbjscts=t Aa_ctjecl ioe: insinoce Theaugh Wohich we —
°
Con_a roners 5 -
= Nar p21 BirstName+"Kalpesh”, lastoume "kulkarni
| : : 7
ily 4ana
—
Lu all Operators and P ;
presi
a] to! is Operator’ i054 Baploio. ony bu) ——
2 hate ir ecinan. S Dgal 8) Respond —
cy Conditional
0} | Arithmeti. cota >
ee (add iemmarseric operand
ip = = _suldtaek Petit operand Fear ef}
a woe mee 2 => Multiply fu L operand: —
iv “4 Divid Oyel¥! hy sigh
[ane ee =f 5 ‘
* vip tt > Tektement “opetatod Seo
vip => = Decrement operabac
Begone af “pe ot ap ops —
Ac saa DAW :
— & dixke) as AC = = 7 -
ees = NouaSccipt” byoe = "text ]Tauseci gt 7“abe?”
> Eris use Por new Woe.
Brnisuuscaten (meu oe
7 vac 24 =10 =15 3
Ancumnecitee caries lie it (ete)
dou +e osibe(S Lec y "V5
= documenta verte: (8x > Ye" (eG)?
clocu Wrorike C4ebr>");
ative ds saeshon (x a Sete Cae)
po ‘ "Zr ays
do the Ce Sr
dosumem. carike C' Aiper""
Jocnene ob. rete: OU" EK Ch
Joument writes Ci Ltr 2)
dowmebt atike » Cs! etal Get a)
locumens write: Cor > ")y
dorument Ryoribe: Co" were Ay =
=e (9/4),
| ah deceit
41 \néadd a
Ybadly 2
Unachy > | -
Ihteo\ ypacision Operakana
ing
= i il bik
sperands sith dnc
fe mipstes Inequ dpec
iv Yo cheeks “tabetha dr stele vole 1 cecther Than
right aide ualueTC yes then churns frue otbewsise
‘alse
Vi kD cheeks? Uatllher Vell opecmacl i is Flees than right
= | A aid os deaind 2
Mi? y= > ch bee Phas or
quate right opecand a e
vil) Z- > Checks whether VG operand is less Naan or |a
=
Logical Oper aknese =
U
4 Fie Koon as AND operator. Tt checks whe,
ba:
y
perands ar_non-
ator, TH check
Suro _oipeccicals' 1s
iq? $5 known as Nob opedatoc. TE ever.
the héolean tesult of the specandvouval
O}l Nesjgnment Operator oO is
De > A ig sight eperanel “ualueto ef} operand
fi) b=) Sghs ug ef cinch ri '
agtiqn Hie result ta the left Sope cane
ji —= > Subtcacteighl apeenndavalite Fromm leFt (ue
dod aseiqmathe scesaib to the \ePt op ae
iv) x= Multiply ~ \ePiSeinelrigist operand, abies on weg
to: oy te Weft operand .
wt fai? Divide tet! operand’ Value by right epccana 4
Jak 9G ofssiiiy (Mae A best AS Ae Leb
opecdncl
iy he > Cred the
1 pie
oan maleFt Sop| “Ternary Opener
tay 2 :
dition > 7-4 valuet 2+ 3y OO10 2Bee
a iny mpl ; re ions. .
Pon detant ei Wheralaunls keywords ond vaciahle
ee — 7 :
a 8 Litcrali= These axe Constand uulues
1) BD Pot Nluctiber Lite al
i Watddme Ss “Shing | Geral
ii) [patteco | “> Reguine Pxoreeeian Literal
~# Reserue keyword! #Yotlable References _*
Jean Prvevalue DK volue of sociable
=i] Boolean Scse VEN undefined TE no variable with
I caerent _Obsjer Bic came exighs , Hoe —
aul _sishwe ion evaluates bo ‘4h
= wadelio, cd__value —i Th aa
joitialzce oe created aac J
a
pee ea ~. Empty Arce — nofelements
a tisaata] 2+ Zlement Bln,
[ted 6.5.6), 97] Destedetfay 7 ae
eos Array uit Sine elrenentes § ding Mo a
frases o
TDsrobicct withiend
Tenby abject-nd Praloecbic
Ao abject a toa
sare) proper teis= a fa
Jon [ficient eapeession ©
GQ. Explain fun _
Sele sen, uth eecyele,
= T+ isa” functionaleetiteratto define ao furcHon ia Ts_
[Whe value of Aes = cap ee SShORMALS inesctsy create
Sunction:
= fuockion | Ra, eae fy ; i
Dl var a= fo4.)); fin » face, abjeck —
32/0 x > pmperty. x of expression o the objec
|
peer== oa
4 0 ('x"" property» of abject 0 .
{2 [1] oP element abYindex 1 of expression a [27
62a fol.x $9 prpecty x of eXpressia a fo3
I
se) Tavocatons expression
1, ti
HTais af % i fe ec ‘oc_methods Tt
tacts With « funciii exarasion wihich identifies the Cunctior
x: A . =
e Luackion * Aon ig -Yolow dby Stag
parents): of zero or -agguments sendcated _
ty comeig aod _clising porteithesig fs
9 f(0) = Cis the fonckion exaccasion and 0 is hn scquisnen’ eng
to AS Math: is the foo
= A and n =
I arsor¥O > q.serteis theron with na_agyuey :
—_|- \A\nen S expreasions acc eunlubted, the Cuackio
Ss Gicsk Brea Wye a0 Jone
en
«ovale produce os Vi s. bas- Condition’ =
—_Is < <
—eveconp le,
reece ent lac erat ta i Cae enll
- iC pditdnal_ctatemnants used Wi decide the Plows of
. : Jie rue, yore perhurto-one ado and if the
; inn ka i 5
I
< [ty 9 ctaternent: -
: = ily Wiese Misnes “OF caditigcol Shutemenls
= Ito ovadetak 2 :
. Gyntoxas -
| A diction)cot) stke co ‘Tour crigh Code kn demo € sn
Nhe)
ead? ,
2x “WE Seton chenc > =f
2seri eee Ls ert
si aigfe hin 1g, i =
: S
nent waite Cas are an dls tr 2");
} 7
\ ° Jue Lac?)
I Serigt > hits Fisk FA
! i
jody)
Doodyc Condition)
Nines of cocle tab ted if the condiHan
i 4
Woes ot code
codon}
Tae pueadhed it Rh
wry”
ip _X
VRP to Wamonatcate "Won else" Bick menk =
ec = “Sext/ jovaseri pt!
iC Cage 8)
4
= 16
documeo’.
ite You a
ool Adult doe 2") 7
else
ee)
seite ("Y,
Li scripr>
ec Adal der “):/yvouva
tax {Lelendition + J ‘
Felse 1f statement
fin core ta Ie exes fee iE condilfen is true,
ela She eeondi hioger
f
7 e5_ob= cade ko “be executed if condition 2 igkne
\se
= Nee al en Feat ae lace ae a
Pole
Jar_one =10_, 4000 = 265.
if
Cone == 20) L 4 i
i is equal boy hwo); 7
Cone +" is less Hhane “+t kwod,
tneamenk uitite fane+*)s Sccakrirnon-llasis| Nested 10 Slate ment
A ected) if aeegeee ie _an_if Statement that is ths
Nucqet of ander if lastaNested if Statements
oa
re afl ctatement inside Gn_if statement
ob & =
7 36 Trpraton)
:
4 an
Pines sof code to be exceed 20 Condition 1 ts true
if. Leanditivn 2 2
Cade 13) be lente (condition 2¢5 be
9 J fi:
voagot) 7) Pere L109
ccna if Gz=10) t :
dotument.vorite (“TEIOF,
if -{iezo)4
dutumentsurite ("is i6 Galler Hoon tory
[ele 1 douumend.cacit
greater than to");
SBR NSeons
ckecneske Ay
been 5
Cos
Nolue 2!
abe
2
- brea’
dicvauth?
Vetu
T Cente:
No tate ment Detuults
_Stabement 95@ . 8 Qik oti
Leap tn TqurtGecipt 1seth_t at ae
lof code _d® specifi oer: of ti white io speci fk
eaditvan —
Soed Dion: = a
everal_Hone sre
[
{
2)co Logic a
vor t=0 351K; ) Kees
ee 7
c )
=a a To
= } fl joa cilid
L 3) | do Vl
— +
TAtke do.ffuotite leap is
ent bile’ \o e onl
difference is thar tn do 7 s.obile ke Tblock af code
cs uted once even heFore.cheching the condition
Quynh & es = :
+3 af code bay seus
| fobile! C condittaa)The_cons Tcmect leombfiakes execution oF th ey
io _th cook \ aad_-cantinlies ution af Inop
Levit, Hk + teraction, a
\ Cogent | ext AAP Vaotilisiaate et £ contique Statement
a _ > =
ad. om
£GcriPh? en 4 ool nasa 7}it
2 ioe te 7 ‘
T ow Ley ue
++ Ff —
tees. —dagsinl weide Cot of loop)
A ss I eecipk
4 nue} J heeel
7 I Lbodsy Ofp a oad
[| docu snent saci tH a as al
fe Lhtenr> aakal 0=e 28 fo
tops the execution ofa loop entir
& Break & “The brent statement
*Yrequm lex 3
gine
amters
“heat [jauseriph ">
if Gee4)
beeate 5
be
document torite Ci);
vu N
(out: of
| docuimenk. weit:
2 script
Gastout
> \o
Dpwey
aig Ta cea
Eee Mok (_opemiac or _cquare brackets (£7) orc used
to obtained Suale Ciroperties.
vad _pirce = baakeprice I Gut the" Price” property of the boc!
= The \el+ hand side Should Ibe a o fon ushe
ue is “an object TC usiog the “dat coeratan, the right
Snandl_aide “onus i IdentiBlér that names 42cann_(PiratN ane Qoeh Aptech; 1 act Vth? “EicatName”
LTE toe Wounds perkcbrnatadlapt peg tect fasta tne expacasion
de. vare ‘brackets An ey Se tes x
Delebtoy Pipaecki i u
= The_dtleke Keshword i used to delete both the-vilue of The
c —————
ae
Jcleke person ("FirstWume"I; /) The peesan object hus no PicstNam
| : a proper by
The _deleke property reburns rue iP delebed Suess ally.elle ay : Ko
|| dodiment. wacite (areolar "be" + car beand + "be?").
Ciegnfas A cloptiménk-rorite {delete AeccRcor propectyies
[The Bcceacfle ora SR septtsentéa hy." gether" cand
—— + hen Phe 4 ceased the tebure -ualue {tac —
used.
th getter i
2 geben Toa cucitinnws) attalhectns. dint works
oh property i diaries
Vast: rok, “Sreaiigalee 4
I metingdl Sun mnsettph th
Tykml
head
apt
s EP vii -
lor w Red”
cand! Poca
att. me i
idotiment. weit CGrepany =
leccipt
bead? Chdpud ©
body me
Jhody) Compania = Parcel
é1htmt JLa Popup Baxes.
Taweccript has three kind of papupBaxe:
i ») Aleck pail, 2? Con Fifiea. be Prompt _b:
| Aleck Be
An! alert box is often aed if you wont to makes
jofarmation Hhrougneste the Luser:
la qleck hax pine user will be
leo eich "Ol She preceed, :
ybtox_£- 2
wsindows lect \C' Ssmebext Ss) : qd
The Soin gécale Ok IO) chetnad the * korith
Shout the \ “usindau refi i
[Lex Natert (Tom
ale Box")rou
Ts [lac the ‘esa sanpeors [oop op Anta cil thaue
iter ~O'” im
aes muse cliGl's "SOK" vane eer
chicka." Cangél”, He bo ce karma’ J
} Syntax 3°
| ‘Shinde SeaiBiren CSatmeo Wy
2h ind ow:con Fire Ge thed ‘bs warithen Gsithout
the window —prePix.
Guiackion sma Func oals 5) to iat
Paap thvor tts a
DL Copefiém Co Pie dM t
Akt= "Yo ssed ok 1" jf Z
1 .
dude" Vou pe J _cénce\ 1"
docment.-get Element By Tel C demo”) iner WITT = bet;———
——- — pepe 0 aa ce eri o FT :
cd Raj ea She eck
alba pop:
Nias either "OK" ee pio reed after entering
1p —iapul valu
_ wel ReMOK “theBex rchuicms’ the inpub value
TE Bhe user lie Cudeel-the bow oul)
yptax 3-
te
Prompt) methecl “can be’ writen wi boat
“tuindo ct
f
on Ole & st
function “Pay Fon Of
Jet
ext
tet
at
Mega aeRO ec cic
trson = =oull WW persan="
L
b= “user concetted the pray
A bey = “Wea Mt pe nt!
fe
¢