Session Plan
Session Materials
These are some examples of previously created materials by mentors that you can use yourself, or for inspiration.
Mentors demo
The Mentors demo is an in-session demo for forEach, map, filter, and chained filter. Use index.js to implement the TODOs in class (FOREACH, MAP, FILTER, CHAINING). The README describes the files, how tasks are marked, and how the code works. index-solution.js has the full implementation for reference.
Session Outline
Array functions
Write this code with traditional functions, no arrow functions yet!
Try to write your own
forEach,mapandfilterwith the trainees. Shows very precisely how it works!forEach- Executes function for each item in the array, NO RETURN!Mentors demo – do FOREACH TODO
map- Changes/transforms the items in the arrayMentors demo – do MAP TODO
filter- Changes the number of items in the array. Let the trainees investigatefilterMentors demo – do FILTER TODO
filter homemade - Get help from trainees to write this
Mentors demo – do CHAINING TODO (multiple filter conditions)
Arrow Functions
Exercises
See the separate Exercises document.
Code inspiration
See the separate Code inspiration document.
Last updated