Transcript from the "Doggo Quiz while Review" Lesson
>> We're getting there but we noticed something, can you say that again?
>> Push is pushing nothing.
>> Right now we're pushing nothing, so we have to push the actual thing we care about, so we just need to add.
>> Candidate, okay. So now what we've got hopefully, is a function, and I'm just gonna copy paste this so that we can try it out in our console.
[00:00:33] Let's try it out. We're gonna need getRandomElement and shuffleArray too, so let me grab those, and I will explain later why I'm not just reloading the page. Okay, so we've got our getRandomElement. We've got our shuffleArray. Those are the, we could say, dependencies of this function, or the things that this function depends on, that it needs to run.
>> Yep, other primitive types, number, undefined, yeah, etc, object. Okay, so if we've done this right then hopefully we should get some choices that include boolean and two other things and in whatever, random order.
[00:01:56] Let's find out. All right, boolean, object, undefined. Try it again, string, boolean, number,. Let's try it again, object, boolean, number, cool. Now let's just double check our understanding and make sure that this actually is flexible. What happens if we make it two choices? All right, that's good. That feels good, we're getting two things out now.
[00:02:19] How about four choices? Okay, feeling confident? Now what if we change the correct answer? I mean, it's a little hard to tell cuz there's booleans and strings everywhere but, There we go, that one doesn't have boolean in it, so we know that it's using the string as the correct answer.
[00:02:42] And are we seeing any multiple elements? No, y'all, we have a super weird, but correctly functioning function here. We have a functioning function which is always a win. So right now what we just did, we just used a lot of stuff that we have just learned so far in the course.
[00:04:02] And more going to MDN and figuring out is this the tool that I really want for this job, and making choices and making decisions?