0% found this document useful (0 votes)
8 views

JS Part-2

java script

Uploaded by

Akansha S
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
8 views

JS Part-2

java script

Uploaded by

Akansha S
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 24
frkdeno ao 2. eee ae fp lpsinsliceletnct end) Emo 1S This method. petiyh, the parks ef. shot “fram a -beginindey tn endIndey. g aes SS Io tht. method 4 hogi ex ts ineluaive and =o Ie eve lesive im ‘es senint /P : 7 fed Gtr = “oraaucag" 5 Haaus | Console slog ( eiriislice OI, 6)) 5 . fering Senipt b /Ps: lot ctrs "Hotels Hey s eansele lag (circle (053) scartpt) Sirl. Concatt sir 2) This method Coneatenates mm jeins tuso jain e bt sini > "apna" 5 p/P? ted sinds"\callege”; t apne college. Ss glcinl. cancatt ctr 2)); Strpoplace O Thie’> method is (used tn? replace —o- pont ‘ep the eivolnmeanielringeme terthe riether «strings or oo xeqular — g qd Oxpreasian : ! we YP ted ote =" hella + iL : congele it ( a a oD) Seems hel pe eee |e a ining > Immutable Onno —> mutable str chanAt( dx) i : This method _nedurn the chante i — given tndex . = fo |. i freee eee Mera Pere ems SLB I ss Conselo.teg (dr chorAt(3))5 ¥. ie | ef porrse = f "Hp, ” « lo fot Ore! = now Array (3) ; atnins/BeO BI ESemITO Ns g array] = 205 orrd[2} = 30; Consalo tag C"Array } 3 qd gd vorr ty O/P Are, A ¢ oO Pinding he lenath > array t d aii : bet array = [94,78 Yo si concelo soo C array. lenath)s J tg pe 6 cre lag ( typeof (meray)); DIP: a “abject aaah indices 3 Orray-name [ position) : Pobieiee iat eer eee een yeeetoused So Ie ——}tensole stag (cause [11)3 cencele Ley pee OP 5 : t CSS Undefined cons) courses = [ “HIM ; ie Console. tig ( eaterces) ie feet =" Reant" a Console. to curses) s - =o ofp: Ie (Guna bes ies C'tegt', Read! ‘ue — senna Over an ora ip Const Courses > Crt Segoe < for (tet f= 0 391 Cocos . ti a Sn $ othe | I iy ' ‘ 2 a ae O/P : ‘ es JT C&S Tas = | REACT @ pusht) S12 rads 1 : = ed prelyt 2 . \ jp fensis counses.s CoM brent Ug 13 \——jfatengers push pl "Renot ") 5 sich = _eonenie. x ih oe ofier adding +", counsoc]s iS — a ad es — foes - Seis ly nee adlaing if gu 4 ee (b) ~ ) pep t): 14 ne rmaves a the Jatt elment bie ef an a t ~ I ett : Hl te Onineemad rene lc. at yie Ly | | t Consele slag Ccoureess: ______|i tej _doleteditem aCounses. papt > | Consele. Log courses) + | Console ston (delated Mem) .2 1) epee Pi (Geren oe Seine eT [rar eerreyre pais cl 1S @ | tnstring 0 1 14 —catvosts —the elements of a _sperified orray into string fpaio aaa affecting the Origfnoa} Arey 2 (er d 2. ene ere Voce ist) . consele lag Coourses .tagining {) e set p)P Ae eet oN, Hot , Cao sol8 : (a) Concadl) 3 [2 seme reduroe 9) a now array Sbjct sthat Contain trop or ae id Arrane, Ista semua Lipa no Cn! epee 1a PELE ctor Se (Gs (ETRE De Clee : fe mpsutt "> “comes conpatl s x | — Con elealog( senresu lt) s Ee O/P 1 _ ISS ARU ea ONISaD cai A moc] Ee Ul tense) 1814 ade nner the begincing ef the piven array nto as = Pecutt > wnehittd em § Hehifel Up} re a Consdle leg (yesutt) 5 O/P s ! i Econ eer Te Sen Venue je oe (QURCeOee merr ret roma aire ee Un eon ne Sf ais sarray { 3 p let peautt = coms. chiftty» s nee censele tog Crosutt) 5 tt OfP : . (cera ‘pm! Solel ty re tuan.e A _not> arn by adlaaall the Copy be th, baa. part nthe pial Sordi os a | iim cian deeseind ys - e — il: Sa Mt ouncee = futon" "cos" Remedi patio’ npr mut Contelo . Piece PT uy) pees LOf Pit ie as Fe ‘ ae oa : 7 i C&S" ' Reaod ts" J Sea. Oo. icpicce (Cocfort ,deleaunl, nerrelonent) a8 Bore ea ees elements in oe ee Qrray . ada pemave replace cd orn = 2, dy by Gon Di) Opps hes ane 2 toi, ino, 5.0, 4) arr pe 0, 101) } Hnpp: (1,2, 101,244 “6 6.1) : te | irk ren 2a 65,6.) ae . (sie 101) Bien Saintes etd) pale | Blnekos af cade, TR pa eae ge ci Sate | PAGE nO, | | aod Brnntlan cian Con be _fnveked wehenover neodod . re Besnre a ie ea teser - cle Ping al — tunel 30s Sg ee have =‘ procesc tis parte _£ @ | Punetion Definition: L “The _funetion _kewirord ie ised tn doin ic Puncton Definition 400 i [ thers one 4hese oa bf 4 eae ie function Yt Function Destaratinn : declares usnsith Pusettin name. | Syntax “ ine aptenat y era a. ea ¢ i] elotemonts { s eis UG Biinetion pan haver =O ae imonse Parame tor Punetinn Expression _¢ ee tiunciian — Sa Suntax ss {et Variable Nome. = finetionnlame eee g aig 4 Stator pAt¢ i 2s : 7 + —+—_is _pred epined lS _methed , that ic used in | worid methods for dif Pere ny? objets, i calls | the method, follin thes Stoner Bbjeet As an eee ni. esi fP Ra cS pt saat! C)i} LOR! fitnotienNiame L)+ fo —= ~ — _ | Function Seem (a , b) IL posameter 3 | __concale log fois) = ce I cee: {1 angursent i Pernetien’ _torth Rotiron Vailere 2 ‘ i Isle cen alt fiinotion that _roetusns —o Value funtten product a,b) OPPs peturn Oo xb } ta : gs : 2 ‘ led resutt = produet aati (2,u)$ Consale leg (rest?) fArrow Punction {33 is concise tiny pf totting hs Pune ton fo horter wots £ dyrow _funetion _nrere fotroduced i eho Ws vensian Dhar) thoes nuirsmmtiandes cane tirnetitrad and pods ble i z E flesh’ i eiiaetiomltan ted Hénetinc ithe —o—— Ye Dome. but sth: Variable Tht PAGE HO. DATE: | J [eis euee ero ef the _macd treo and ePPiciont — . ae methods sto! ergatte. 0 fnetien in Lal beceute | es iE ond, Comparatively ea implomentafion HAO Chea ren fropl) as rane _cangect Il Version pf ee oc__rormaf funetian | t A i Oxpreceton or sy s m 2 wt ee — : _@ Ox * led variable name /fune ton name = Ee Coielaunee =) oy nny fen d d Lith met parame ton uotthond parame tor + arrowStm bes const qertem = (0, h) =) Const priniHotin = () =) $ = Tapes ne ee 3 Console Lng "Hotint) + zi i j Aprawsim( 5, 6)3 printHelta () O}P Of Pat uy He Nn Pedties the! Size ef athe 04 : : a ST arr, reduce ( calthack (Value ,index ,aray)) DO igtinn ne Losin ten 3 PAGE nO, Thee ieeaaien Objert Masel.) eared ato ile pADPR Po Wet PCO ee ee Son ae aoe | — We ~~ as The default ebiest ope AAPOR waindall ann f1e Cen cat) al) the frnctions of twsindano L- . hy —specttyéng _uslnelass) ox ol Se Pod taindnus-alerd ("hella jauntpotht "); 16 Same Akt oleniat "hells jovatpaint ") fatinds ud. 1 a ia j } 7 Ch otume nt hhetory f lacoste Iliodava Ghject : It penresent a woindots in harowea fin__ehject ef totndoio “ts preated Aattomatically — id on browser te ___+he object Of. bane: te raed Methnds of L3indsts _e-bjve Qlertt) + dieplo, alert bo Contains: north Ok__button confirm {) ¢ confirm dialog box containt mess tsith Ok and cance} buon . prompt t) : ee lag box +o" get input _sfaom 4 the User open t)! Opens the nous MOUTH OSU cae 6 scerlbat o Close ()! Clocer the current tuoindees Bille ke er ee PAGE NO Windows. document Is Same o8 document __ eas tn Wc =" The WSC Doetemen toy : rpom oe ie platfacm t ms interface that _allenes programs and seript “te a feally arrees And tpdate “the | content ( ¢ sinweture and Style ef _a__daciement x Prepertios bf, doctrment ebject 2 Let's seo Ine node, <—— _atindaud | properties st _corriment cy | ebject thot cain he node <— Aheument accosted and madified _ ey \ \ bby the document bee head = neta meto tle link 7S _Serink ing ny he On PAGE NO. : LDAM Manipulation ¢ 2 et = Selpoting with tq: (4) s —| — Wales Can tito g dontiiond getElement pyld¢ \ 5 method Ep. get ‘va live ff chkeckinnatidey sii Ee nee In een Ad Yor tho inpud fietq | : Be Scrip} typo 2 UYyext | javelwentpt at = fluno Han —geiew bel) ¢ alert (number * member “nw mber)s aI “ Leertnd» inputs typets Yer" Bis ‘nember" name = “number / < 4orm 5 s . E Enter np : a |
‘ 2 cic tt naar ne ae i) | This method. tel weed ot in ts : | phe —_¢lemends¢ _t-hon! | oe s ieeere [This DOM method _“"reticns on arr tke ebyect \ AAA \ diy olass = "Chass" qhis tc 0, simple class implementation < lain, Seript pe 2 "+toxt) javaseript i lass! Var 90 32 pciuments. document =nsrite ("On Calling x {4 arefll petipn a5 Like objet !
h+ m1) ee a = E ~~ selenting with a te This potian element eb Specified | method. ta. name. > i a — Soript type = te st] jaiianseriph Function countparat) t —_ or 4totadnara = cl St arb) alert ("tndal p tage ove “+ toh z h 5 ree {ser tnt Spal hiSeevestiows oS peanaraph ‘p> £ niga Elerion oss Laver ( do Connt toto) “ ntiimber eh pocageagh by pA cement By Tagnlanet mtthet.|

a 7 9) f . ; vi me (Grae a i sae | quer Sploctor 2 @ oe dontemend= malas aun celening 0) wena e+ First Cloment —tsithin the dneumenidioaet |_ selector = | 2 nn Hains Ore. find oull b _yotuanad ay ctor (seloctena) : y OeeGRGt cs a... [fh -tws ginoed —a f det oa Soca ee ae the _Speoitiod Selection 5 sho 3 pisos Wighsulide sean pea querycstecler All () instead oanAn Syne cee DOMException S ntox 3 rl Selectors) th rednrns “0 snlodell'st Es wo, Properties : a tt ome $ poetitans the HG _Nime ef an element, ir retuens the. ee = —_# ntax 3 — # Clement « LagName A. |! innerText + oo tian ‘he tex _pentent of» the jj element and an ihe Children sole ste tsed mee Inthe tue es_tn Generate oth i i a carl SY h> Prive ¢ 7h 3) Swoh sae tortling Ho at ae alia tion au Lid manga Li) Apple <4 UG) Banana liv a z Henge div. tone: en ge + Apple “Poul-e\nmeange\nAppl\nBanane) — diy. toner HTM) ‘on __£h3) fruits ¢7hay duly <> mouy LY\o idApplesiid~ An__ Banana

You might also like