diff --git a/index.js b/index.js index 18adccbf3..0b3d512b0 100644 --- a/index.js +++ b/index.js @@ -168,10 +168,13 @@ Aşağıdaki işlemleri yapmak için indekseGoreFenomen işlevini kullanın: NOT: DÖNDÜĞÜNÜZ DİZİN YUKARIDAKİ BİÇİMLE EŞLEŞMESİ GEREKİR, YA DA TESTİ GEÇMEYECEKTİR! ÖRNEK: fenomenler dizisi ve 3 sayısı ile indekseGoreFenomen çağrılırsa, `3. indekste bulunan fenomen: Leo Messi' */ -function indekseGoreFenomen(/*kod*/) { - /*kod*/ +function indekseGoreFenomen(dizi,indeks) { + let profil = dizi[indeks].profile; + let text = (`${indeks}. indekste bulunan fenomen: ${profil}`); + return text; } +//console.log(indekseGoreFenomen(fenomenler,1)); /* Görev 4: @@ -182,9 +185,15 @@ Aşağıdakileri yapmak için profilListesi'ni kullanın: 🌟 Dönüş ÖRNEĞİ: ["Instagram", "Cristiano Ronaldo", "Kylie"....] */ -function profilListesi(/*kod*/) { - /*kod*/ +function profilListesi(dizi) { + let origin = [...dizi]; + for(let i =0; i100000000) + { + newArr.push(dizi[i].profile); + } + } + return newArr; } +//console.log(enFenomenler(fenomenler)); /* Görev 8: @@ -247,9 +278,16 @@ Aşağıdakileri yapmak için fenomenGonderimSayisi'nı kullanın: ÖRNEK: fenomenGonderimSayisi(fenomenler, 'Will Smith') çağrıldığında "136" dönmelidir */ -function fenomenGonderimSayisi(/*kod*/){ - /*kod*/ +function fenomenGonderimSayisi(dizi,profile){ + for(let i =0; i maxGonderi) + { + maxGonderi = dizi[i].posts; + fenomen = dizi[i].profile; + } + } + return fenomen; }