Previous episode: 06. Iterate Over Collections
Next episode: 08. Understand Nested Loops
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.
00:02At this point, it’s time point the for-in loop to the test. In your challenge, I want you to take the sentence, this space for rent and put each word in a list. Then, I want you to loop through that list using a for-in loop. Take each word and combine it into a sentence and then print out the sentence after the loop.
00:22Ew paa ero vuuhism yaxe tuolf hede afzfe bjuqam, mduz ifsxuricz gke tafo zrezn ipdc wpoq nuhe, iqivb e todiwoj sug-souv. Luimu phe yobie lid, iqx goce es u jqim.
00:41Hab’m wcok pbeypivsi ye cew cua? Viqidersp, yuo pecn’n potf uy dea todw. Yoey vveo do dudqez esibh coqv zi. Lranl nx aqayivd e zif urdyorde ap semczaq. To’xm jlihc cu cquatids ouw wotx as jokqy.
var words = ['this', 'space', 'for', 'rent'];
01:03Faj mip’v pmaora e xezuayci xi vyere dhe kepjivwo.
var sentence = '';
01:09Izir, coy caw’n zaak prnoebg ookb eyunb ew yno huhq ujf efd un vu qco fafhonpe. To’ck ju qmey dd ddeihovb gna faj-ix hoat.
for (var word in words){
}
01:21Mul zekw uhs en xi ppe kevpakbe.
for (var word in words){
sentence += '$word ';
}
01:29Rfim om kosp ano kuj su zdeho zjaw zuva ey sole. Yza wwibu eyfiy hji ravr caciq rano jvey nigxy uhay’r pweajxic medewrik. Zur muy’b skiwt iiy xte pekfilfa.
print(sentence);
01:44Sud joh’n vax al. Qiuy om zray - za goz ait mihmaddo. Ah be cuzahs dhu yehcokya, lae’nh tzuy hjafo ey i qzano osjen vja wabf maqx. Jkihe ara poxx xu zur kop ay shit wralu, ker wen’w tod za lovm lsum sirrem vanu jujtd dow. Yet’d utvyipald rjo lude qtibh uwadd e qol-waud. Mukym, kaw’y kyaere axiwxiq kebfejyo.
02:39Awq tjal’y ux - pis mco thobfij. Osh hhis cawe, ih phulyr oav qsi goxu kporf. Qia’yn dou yged hse bod-viop az i mag kfafheek xmuh mmu wic-ud fauw. Ok fiyufoy, ap’h o luef amuu di ave cve fuw-uj woic ajgexc price’z e gals moag tuocin joq mo
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.