diff --git a/module2/lessons/js_approaching_problems_many_ways.md b/module2/lessons/js_approaching_problems_many_ways.md index 0d46518..46a3072 100644 --- a/module2/lessons/js_approaching_problems_many_ways.md +++ b/module2/lessons/js_approaching_problems_many_ways.md @@ -8,6 +8,8 @@ tags: prototype methods - Develop a deeper understanding of iterator methods - Reduce the risk of being too attached to one iterator method OR avoiding an iterator method - Compare and contrast iterator methods by using different iterators to achieve the same output +- Practice using console logs effectively as part of your workflow +- Take note as scope issues arise ## Activity @@ -56,8 +58,51 @@ Expected output => `[ 'Tamagotchi', 'Super Soaker', 'Pogs' ]` ### Round 1: `forEach` - Solve the prompt using a `forEach`. You may not use any other iterator methods. +
+### Round 1 Reflection + +- List out all the steps your solution is doing. Be as granular as possible. +- What are some pros and cons of using `forEach`? +- Can you think of any prompt/scenario where a `forEach` would not work? +- When throughout this solution did it make sense to console log a piece of data? +
+ +### Round 2: `filter` and `map` +- Solve the prompt using a `filter` and `map`. You may not use any other iterator methods. + +
+### Round 2 Reflection + +- What are some pros and cons of this approach? +- Why couldn't we use only a `filter` or only a `map`? Why did we need to use both? +- List out all the steps your solution is doing. Be as granular as possible. +- When throughout this solution did it make sense to console log a piece of data? +
+ +### Round 3: `reduce` +- Solve the prompt using a `reduce`. You may not use any other iterator methods. + +
+### Round 3 Reflection + +- What are some pros and cons of using `reduce`? +- Can you think of any prompt/scenario where a `reduce` would not work? +- Look at your code from the `forEach` and `reduce`. How do they compare? +- List out all the steps your solution is doing. Be as granular as possible. +- When throughout this solution did it make sense to console log a piece of data? +- Out of all 3 rounds, which approach did you prefer? Why? +
+ +