Assignment No - 1 Css
Assignment No - 1 Css
Date
io the Tavascxipteverything
Objeo-bosed-as
obje that'sCuhy ja uascript ison obect bared
progra m ming Qanguage (Seaiptirg language).
ake o the
Tobulh-fumctioni-jusk Rangucges
ioinfunchon.
4) stattmnt-java
if-else- scripE Uco 6os ifelse
SAattment ike o ther Ranquages
user inpui
)vokdating Jovaccaíptis
va lido
tion it Ualid
ate e teIed Uscd to prf
data by the
User
2) Scaiping
Danguagei-
jevaccaipt
exe cutìnq pToqram that'swhy if isSciphn
Donguage
e-g <script) <\scoipt>
Que a]Explaîn)
Dame.
: Method )PopeTty ) Evern te ) objer
i) Me thod: -
A e thod is Cet oE state ments (actionc)
obje when it Teceiues mest a
)Poopestyi
A property data VaUae ass uatt o d cwith
objec
Page No.
Date
iv)obeci
O bj ec to of
otoTe collecfions data &
Co mplex entities.
3) Cogica Operator
4 Bitwiceoperatorc
5) Acsignmot Opratoss
Con di tio a! OpesatoTS
ondi4ional opTto6s:
Caled
Opesaos,T5is fine
40e or alce f V aue 4theo
ote
eseU of the evaluah'on, depending pon
th
Que 4J Explunlwi
tch ca ge ctak
Stak meo
in
to e jauorcaipt
the stak entsfoo xecuteOne of
m m m
bloc
uce the saitch
otatemeot +o ce le ofCFatntn
One
blo çkcof execute d.
Co de to be Of Tnan
o9ait the
be uccd.
block ot Coteme te
a
Cpeofied Con diFoo become
Carr.bT nd):
4deteteret </CTípt
Carn.brand):
nasuti
Aksko Oeletimg Properties:
Color: undefined
Brand:Gndefined
Que 7]Explain
Propeshy qetkss metod
in javascript
Gje tk Metho d:
A
9e th metho isuce d to toe 4heValwe
es Of
eg'
<scsipt
Page No
Dste
Va Cat
Colos
brand*
gel co mpony)
baodi
4hic.
decument. ln (cat.Company
cUite
</sc ip t
Ities:
SetkT tMetbodi
method ic to cet the value of
+he 'cet!
keywoTd
ollo
wed b the propesy
<seoptz
Vas Car
Co l o o iled
";
brondi
Compa ny (vawe
+his.
brand
Car co mpany
ldocumnt.
Curiteln (car.
brand);
</scoipj
Olp:
Page No.
Dato
sipt
+he belp of sita
ble exa mplt. cuit
Dot Syntaxi
PTpe & ne thode assoJaed
Objech Con ocesscdbyucingth objonor
be
a app4ico hon.
Studet
Vas
fiTtnome: A mit":
"Gupta
id |2;
fwimameifun
ction() retuID this.
fitsNa
Narn Y
+ + +hislas Dame
document osit("<br/);
Fage Fie
Date
lassPifth
Soden
Lict &
explainLogica operatovc in Tavacc*lpt.
0
Logcolopesatorc
LoqicaJ opeTatoo ae Oce d
logi betweeo Vaiobles Values.
If tht bothoperands
AND Opkrator) ZetO the Co nd beco oec
gical If
JI(Lo Qny of the two opcrande ore istrue
(A|e)
oR Opcato) then Condn beco me t ud
lLogi
a|NoT to eeTsesthe 0oqical tate|(AB)
OpeTap)
+hen LogicalNoT opraU o will
make folse
Cuith"
Statoentclause inTavascvipt
ucingcwtable
exa ple.
with SI a me} -
porticwar b ec. o
Dats
yotox:
L
block whr
Code
aesed diect
o
bjrpropestie
KsCipt
Car
Colo
brand:
fundiomprinCarTofo()
with Cco)
docu to}.wrie Colo ,co
lo )
Cwte (1Bromd:"bsad):
psintCar Tm fo (0;
<lscripty
Olp Co lo Red
Braod onasti,
nam=pTO pt pleace
( entr you narn
Aoiba"):
do (ucetConce|ledhe
Cumemt.uite
pro np
");
O/p:- HelloAriba
checke cuhethe
Javaseoiptfo thbat
12] wite a
Dot.
Que
Ssed staing ic paJind
o me
po
KScoípt
me (Sts)
is
uction Pa indro
ConcE
Cons
madam
PageNo
Dats
ComcE
Consl
Curit
/|
La...
PaJi odome(Cla)):
is
document.
tia te
Bifferen 6et ween promp 0 g aleo()
Qu 3
me thods.
PoompO alest(0
) a
iop
bo x.
Jo
n
display
a
essoge
ofificohon
tping ing
inpu field. c ackoowDedqe the message
a Tavascript
tbat oisplays
fisst
ao e ven
PageNo
Date
ContevenNumberElementdocumcnt C eak
Elm(ot(p);
+ex Con teoti)
body:appendChild(even umber Elemcnt)
scsipt
4 lo |2 |4 20
24 262 8 3o
Quc s]
uTit a ProgTam to print Of e ven no's
Getces 1 to Using for loop.
e
fo (eet i=2j
i< = (o o)it=
2)