forked from bloominstituteoftechnology/JavaScript-II
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
36 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,40 @@ | ||
# JavaScript - II | ||
With some basic JavaScript principles we can now expand our skills out even further by exploring array methods like: `.forEach()`, `.map()`, `.reduce()`, and `.filter()`. We can also look at how closures have a large impact on how we write JavaScript. | ||
|
||
## Assignment Description | ||
# JavaScript - II | ||
|
||
* Fork/Clone this repository. | ||
* Complete all the exercises as described inside each assignment file. | ||
* Use `console.log()` statements to check to see if your code does what it is supposed to do. | ||
* To test your `console` statements you can run `node /assignments/<fileName>` and see what prints in your terminal. You can also use an online tool like `JSBin`, `REPL.it`, `JSFiddle`, or even your `Chrome developer console`. | ||
* Once you finish the exercises in each file, commit your code, and push it to your fork. | ||
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. | ||
|
||
### Callbacks | ||
### Task 1: Set Up The Project With Git | ||
* [ ] Fork the project into your GitHub user account | ||
* [ ] Clone the forked project into a directory on your machine | ||
* [ ] You are now ready to build this project with your preferred IDE | ||
* [ ] Use `console.log()` statements to check your work. | ||
|
||
* In the [callbacks.js](assignments/callbacks.js) file you'll be receiving a lot of practice on how to use callbacks to pass around data. | ||
* Write out each function using the `ES5` `function` keyword syntax. | ||
* Remember that a callback function is simply a function that is being passed around to other functions. | ||
* **Stretch Problem** After you're done with all of the functions, go ahead and re-factor all of them to use `ES6` `Arrow Functions` | ||
### Task 2: Callbacks | ||
This task focuses on getting practice with 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](assignments/callbacks.js) file. Notice you are given an array at the top of the page. Use that array to aid you with your callback functions. **Remember that a callback function is a function that is being passed around to other functions.** | ||
* [ ] Write out each function using the `ES5` `function` keyword syntax. | ||
* [ ] Solve the problems listed. Save the stretch problems until you have completed Tasks 1-4. | ||
|
||
### Function Conversion | ||
You will see more and more arrow functions as you progress deeper into JavaScript. Use the [function-conversion.js](assignments/function-conversion.js) file as a helper challenge to showcase some of the differences between ES5 and ES6 syntax. | ||
|
||
### Array Methods | ||
### Task 3: Array Methods | ||
Use `.forEach()`, `.map()`, `.filter()`, and `.reduce()` to loop over an array with 50 objects in it. The [array-methods.js](assignments/array-methods.js) file contains several challenges built around a fundraising 5K fun run event. | ||
* [ ] Review the contents of the [array-methods.js](assignments/array-methods.js) file. | ||
* [ ] Complete the problems provided to you | ||
* [ ] 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. | ||
|
||
### Task 4: Closures | ||
We have learned that closures allow us to access values in scope that have already been invoked. | ||
|
||
**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](assignments/array-methods.js) file. | ||
* [ ] Solve the problems listed. Save the stretch problems until you have completed Tasks 1-4. | ||
* [ ] Once you have completed this task please submit a pull request against the original fork. | ||
|
||
## Stretch Goals | ||
|
||
* Read the instructions found within the file carefully to finish the challenges. | ||
* The last challenge is to come up with 3 problems to solve and then build a solution for them using any of the array methods listed above. | ||
* Share one of your favorite problem/solutions in your team meeting. | ||
* Complete each challenge presented before moving on to closure. | ||
|
||
|
||
### Closures | ||
The [closure.js](assignments/closure.js) assignment showcases how variables can be used outside of functions to store state using closure. | ||
* [ ] Arrow Function Syntax - You will see more and more arrow functions as you progress deeper into JavaScript. Use the [function-conversion.js](assignments/function-conversion.js) file as a helper challenge to showcase some of the differences between ES5 and ES6 syntax | ||
|
||
* Complete each challenge. | ||
* [ ] Look up what an IIFE is in JavaScript and experiment with them |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters