Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sekharp/45f9213d45b7394cabcf to your computer and use it in GitHub Desktop.
Save sekharp/45f9213d45b7394cabcf to your computer and use it in GitHub Desktop.

Array Prototype Methods

I understand that functions in JavaScript can take any number of arguments. Yes

I can describe the similarity between blocks in Ruby and anonymous functions in JavaScript. Yes

Where are the methods available to all arrays (e.g. forEach, map, etc.) defined? Array.prototype.ethods

I can explain the difference between using a for loop and the forEach method. The for loop needs a bunch of parameters defined, whereas forEach implicity knows what to do to iterate through a collection.

I can explain the difference between forEach and map. Yes, map returns a modified array, whereas forEach does not.

Can you explain the process of taking a plain JavaScript objects, transforming them into DOM nodes, and appending them to the page. Yes.

How comfortable are you using the forEach() method? Pretty comfortable.

How comfortable are you using the map() method? Pretty comfortable.

How comfortable are you using the filter() method? Somewhat.

How comfortable are you using the reduce() method? Somewhat.

How comfortable are you using the sort() method? Not very but I think I can figure it out.

How comfortable are you working with simple unit tests in Mocha in the browser? Not very, but I will hopefully figure it out by the time I turn in Ideabox :)

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