Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Peter Retvari
2,566 PointsHow about this solution?
function print(message) { document.write(message); } var helyesValaszok=0; var helyesKerdesek=[]; var helytelenKerdesek=[]; var kerdes1=prompt("Megmosod a Petinek a haját?"); var kerdes2=prompt("Utána megyünk Alleba ruhát és könyvet venni?"); var kerdes3=prompt("Ed Sheeran a legjobb előadó a világon?");
var quizjatek= [ [("Megmosod a Petinek a haját?"),kerdes1], [("Utána megyünk Alleba ruhát és könyvet venni?"),kerdes2], [("Ed Sheeran a legjobb előadó a világon?"),kerdes3] ];
for (var i = 0; i < quizjatek.length; i+=1) {
if (quizjatek[i][1].toUpperCase()==="IGEN"){ helyesValaszok+=1; helyesKerdesek.push(quizjatek[i][0],helyesKerdesek); }else { helytelenKerdesek.push(quizjatek[i][0],helytelenKerdesek); } } var listhtml=('<ol>'); listhtml+='<li>'+"Ennyit találtál el: " + helyesValaszok+ '<li>'+"Ezeket a kérdéseket találtad el: "+ helyesKerdesek+ '<li>'+" Ezeket a kérdéseket NEM találtad el: "+ helytelenKerdesek+'</li>'; listhtml+='</ol>' print(listhtml);
Steven Parker
243,656 PointsSteven Parker
243,656 PointsWhen posting code, please always use the instructions for code formatting in the Markdown Cheatsheet pop-up below the "Add an Answer" area.