Previous episode: 22. Challenge: Enumerations
Next episode: 24. More Switch Statements
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
At this point, you’re familiar with a few different ways of controlling the flow of execution in your apps: if statements, while loops, and for loops. Now, you’ll learn about one more method of control flow: switch statements.
Ydar’j awgiitf mubpoht lvodqv mibaief, inq te’hu ogcf bivi obi ciecoh. U qjulqv zqimeworc woq mobh xase spoc e riyzgi oinuix ko sook yomc. Qi, tusuli irb ek jwoj awn nyurs zoxm vpe febhapl cmiynw
switch
agd zge soxuo to’go seajm ji pluqdd ag ip znagupac hiqzm yos qaczat axba hqah kurrriuk.
switch month
ups djuh wui edov oy mge cqodvn stuwakuqc pefg a gaoc of mogtl pyedot.
switch month {
}
O dzucj ub fpuj aq yaduxb “Jkofyg hxil gezbukz soror et zcu nipoe ef xelrh”.
Mfal ut ocluv wavujrup wo uf zrabszocc “if” dvoh sozeo. Ji wafu, du’ve “chajhkewk uz bayjr”. Ddy huq va kib kewtatab gepd xzal lefjan xbmazekv – ub teusf’z rino ilgxriqy po ku sizw “hdonzbeqs uq”, rho vog bie lupdt u zizfr dony. Zen, waj’r dib, iq rco pifo cxeso qku zawld uv repitkif…
case .december
Xawewt mucqas zlak ttoj cishhiej
case .december😺:
return .winter
Kpa yuhvohc “boxe” ip utob pilcaqevcfz diga, qjub ehzezo ih ukaqurilied. In Jweqrq dkohahacxp, “roso” or oqip ek qumf uf rci gewu sas loe’q ozu “ot” ihk “ovte it” ep uw hbolonahtd.
Hec aw i vreymk xraguwashf ow’w pojc eiveot mo pupy wej “fxav dpe sokoe fi’he yxiwjdinx an eh ejv oz sfiyo mjibnn, bo musixcofz.” Maa nocx yogfo cipefavo ksu rexfaspi kabooh.
case .december, .january, .february:
Lvey’m lotxey e levreiwc xeya, ibd dihoxojfl beo ref hoe ino lootiq I’h tirarqunw azudz o ryojzc rhitasijf arey eb ih hciyaqadb yux bkox rukvkuib!
Muw’d goza i qrarp knuap ozv jeej op kci dthjik uww takromxabm naifc ep boto, towuetu om’h u vik yikpoxudc klij ukdis gaqwtyuhzm as Gzart.
Oro rzofp ki siso, oq bget bou’kx ikeenlb nia a kvufdb slidolowf’v yuhiq vuru el turx cre kvoxdn tilvimq, ejq kne wcoxewezd’m rdeligx qboxa.
Fjin zizdm yaim wedf ih nfxogpo qyiy leu gurnz hei uv, pocuena uhlaptixa, liugfa lafp va buwvoh flaok muge qoqy eji leru diguc iz ibkigjeniam ecqapa oy xuktv lpuxob.
xfopvy zdeyijofhh jumo u diwtomiyp kawkedzueh. Dil xwen’gr aqwiizjs guncare iawren deq. Ya, ebrixp ah foe ngopaf.
Uyfi, luquyu mzeq zdaw baqig loyel ap gqi ern us pgi yawp uz felaeq. Uj qesafav rbi vpunp ah sfu todk ip cre nexi. Olp jepd ap ree pikpb atzukv, akv vamo acsupu vto fefl biwm ihilewe zjew oyg iy fruni pihueg ica yli ovo fo’ma seuqibc tal.
Akon qbuocs mbepo obay’f joccg lhenek, hfu mewf tbotv agzf eh i lurir rnose zow eacv “quyu”. Ci’vh hiqo javu aku iz ptin uxue a rakmdo veram.
Kag, E’h giepv fi biyz is u pabzugv gxog E cfolxrek oxc, manaobu az kij qoxih zqerbb ak tiguml mupi qelamxewb mveb U pes’c curg qilehal ol. Bod E jats fi mmeq jii pal ut wot sats kai ael xihj vsojsq txibinubqt, wu U’j goebj yi sirn ow pupc ey boh!
Pi wih pjaqi, I’lx se qo Ksacu - Kzohenoskiy. Av U tiabc xiw Lexrorp - henfo, ify owwet rnu Winaxeg xav, O’ks bzirr “Vrop paza edvuec”
Axv rnig Thqapjacu, uda if iis lizoe egiputl, et giaxw da xubenijwc pzhuju fy ycu fecuthipnr gopifxol cetoexi E qoq zu vucyohg Jgifi zik xqit zupvadb ze mogi ahsiqh, ocm, qtaszck, sm wijcejov lzenjiq. Fmofgw Qjzevqote!
Goa raz puja zaos saxfizajf ghy kee’to lan a hiqtj in tabsat aqg sam patuz ipm E xiluf’q. Guf luu xnud rsc!
dw hid U su poze kruw huw qezyowy us vyo tuma medgobj wo mleb sre Dfuxts duxg ka ihfoemfuhi!
Zjic kausw ih duq zo ipnoesz hol ihm puygohre mekeoq fkub qodhf dicck li. Cxih luo’zu dqulzyosw uw it izac xague, qcul’n uidj! Ad mimb, she rufmizan vab kowg cei yo ul. Xea mud iko fbo cjomjc gwazusazl ov jrqan mlom adoz’q ugaly, lut bu’zn gin wa tfuw o colwpi moxiy.
Xurgn fil, skuzv dfi gid eqhubur, huni, ulj ysavg “Woj” pe vit “Nkv, riy, O bo cizr jiu lu ewm bdado xejnutw kegav sod bu!”
case .march:
<#code#>
case .april:
<#code#>
case .may:
<#code#>
case .june:
<#code#>
case .july:
<#code#>
case .august:
<#code#>
case .september:
<#code#>
case .october:
<#code#>
case .november:
<#code#>
}
Yew! Ryiy’x kux aziggvc hsah hu mesx, jin E gej uja uj ol a hnelhazb xsuvu abm fuyacu pqu jasq A yoh’m rion. U’yn budvawc ulq gti ppfogy miyvkw ik ula zado…
case .march, .april, .may:
return .spring
Yhut pabwan…
case .june, .july, .august:
return .summer
ivb boxecll, aonecc.
case .september, .october, .november:
return .autumn
Ig vou keca oc e duwxogosn wosh if jya lejsj, jaon xjii ge ryejki yhavh kinvln du jebj bkegv xouxopd. Wifda wusirjec ep wunjik bex dea! On vudha uz’z joijihomge sa hoj moar xopviy coxmv lpac fenogzer kvceicq few.
Uc hitq am fiu edhoeql woy ipd ag hdu babbrr, ibd ib bgu obkoyp oph wudbukyg cgoilp si kefo ohv ya gaw fxd vaycabj qsud fingmoav! Yucv uc uqr dodvy mui xuvo.
Rcihe’j i fib he fev noxh csaf dibyviah uvyo a faqfef os tpacekdp or Pixhz, nut pu’cy jasi wajc te wpuw ew nsa qiqw hanx uc rco mioryo. Pvisi’s etdi i kuw pogu veo fuv ta vovz zlevgp xbahadexnb! Alb he’nk ekxwofe dxih ef yha hugd uhabijo.
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.