With some basic JavaScript principles in hand, we can now expand our skills out even further by exploring callback functions, array methods, and closure. Finish each task in order as the concepts build on one another.
Follow these steps to set up and work on your project:
- Create a forked copy of this project.
- Add your project manager as collaborator on Github.
- Clone your OWN version of the repository (Not Lambda's by mistake!).
- Create a new branch: git checkout -b
<firstName-lastName>
. - Implement the project on your newly created
<firstName-lastName>
branch, committing changes regularly. - Push commits:
git push origin <firstName-lastName>
.
Follow these steps for completing your project.
- Submit a Pull-Request to merge Branch into master (student's Repo). Please don't merge your own pull request
- Add your project manager as a reviewer on the pull-request
- Your project manager will count the project as complete by merging the branch back into master.
This task focuses on getting practice with higher order functions and callback functions by giving you an array of values and instructions on what to do with that array.
-
Review the contents of the callbacks.js file. Notice you are given an array at the top of the page. Use that array to aid you with your functions.
-
Complete the problems provided to you but skip over stretch problems until you are complete with every other JS file first.
Use .forEach()
, .map()
, .filter()
, and .reduce()
to loop over an array with 50 objects in it. The array-methods.js file contains several challenges built around a fundraising 5K fun run event.
-
Review the contents of the array-methods.js file.
-
Complete the problems provided to you but skip over stretch problems until you are complete with every other JS file first.
-
Notice the last three problems are up to you to create and solve. This is an awesome opportunity for you to push your critical thinking about array methods, have fun with it.
We have learned that closures allow us to access values in scope that have already been invoked (lexical scope).
Hint: Utilize debugger statements in your code in combination with your developer tools to easily identify closure values.
- Review the contents of the closure.js file.
- Complete the problems provided to you but skip over stretch problems until you are complete with every other JS file first.
- Go back through the stretch problems that you skipped over and complete as many as you can.
- Look up what an IIFE is in JavaScript and experiment with them
Rough draft of thoughts for stand-up and retrospective forms
I finished the JavaScript II related assignment (+ stretch challenges) and read about IIFE's
I will need to start reading material for next week's assignments and maybe start work early.
- I have a better understanding of closure, but would hardly call myself an expert.
- I occasionally forget the syntax rules for some of the array methods (I know what they do, but forget what exactly goes where)
- Closures make a lot more sense now, and I have some idea of how powerful they are.
More time could not have spent on real-life application of closures besides function factories and more advanced use cases for map() and filter() which used more parameters than currentValue.
Less time on digressions, reduce time spent answering interesting but digfressive questions
This might be an edge case but for the question, "On a scale of 1-10, how likely are you to recommend Lambda School to a friend or colleague?", if one's colleagues/social circle already includes software engineers/web developers and/or persons who might not prefer the Lambda School remote learning approach, I'd give a rather low rating to this question. Maybe revise this question to say "On a scale of 1-10, how likely are you to recommend Lambda School to a friend or colleague who would be interested in learning software engineering/web development and would prefer a flexible remote solution?" Also maybe include N/A