Basic Algorithm Scripting - Chunky Monkey

The first loop is completely unnecessary. I tried to point this out earlier by asking about its purpose, but… :see_no_evil: You are right too…

Yeah, you don’t need to use a loop to copy an array. But, I really, really don’t like telling learners to throw away code that correctly meets a goal, even if there exists a more ideomatic way to get there. It’s about the learner reaching a solution that they built and makes sense to them. We can always help them refactor once they have a solution

1 Like