Skip to content

Obed Lorisson - Javascript II - #257

Open
doobee46 wants to merge 6 commits into
bloominstituteoftechnology:masterfrom
doobee46:master
Open

Obed Lorisson - Javascript II#257
doobee46 wants to merge 6 commits into
bloominstituteoftechnology:masterfrom
doobee46:master

Conversation

@doobee46

Copy link
Copy Markdown

Array-methods done
function-conversion done
@camilamdaniels

@camilamdaniels

camilamdaniels commented Aug 20, 2018

Copy link
Copy Markdown

JavaScript - II

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
  • Use console.log() statements to check your work.

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.

  • Write out each function using the ES5 function keyword syntax.
  • Challenge 1
  • Challenge 2
  • Challenge 3
  • Challenge 4
  • Challenge 5
  • Stretch

Task 3: Array Methods

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.

  • Challenge 1
  • Challenge 2
  • Challenge 3
  • Challenge 4
  • Challenge 5

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.

  • Challenge 1
  • Challenge 2
  • Stretch

Stretch Goals

Arrow Function Syntax

  • Challenge 1
  • Challenge 2
  • Challenge 3
  • Challenge 4
  • Challenge 5
  • Look up what an IIFE is in JavaScript and experiment with them

@camilamdaniels

Copy link
Copy Markdown

Hey!

Good job completing the challenges! My feedback is below:

  • In callbacks.js, remember that the pop method is invoked this way .pop(). Also, is there a way you can access the last array element without modifying the array? (hint: look at your code on line 18 of callbacks.js
  • In 'callbacks.js`, in your sumNums function on line 32, you need to add x and y and pass the sum to the callback function.
  • In 'callbacks.js`, in your multiplyNums function on line 39, you need to multiply x and y and pass the product to the callback function.
  • Look at a few closure examples here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures and modify your functions in closure.js. It might help to use function keyword syntax instead of arrow syntax.
  • You did a great job using .map(), .filter(), and .forEach() in your array-methods.js assignment! If you have time, work on challenge 5 from that file.

Let me know if you have any questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants