Skip to content

Instantly share code, notes, and snippets.

React Router Prework

This gist contains a short assignment I'd like everyone to complete before our formal lesson. The prework involves reading some of the React Router documentation, and will allow us to keep the lesson more hands on.

Instructions

  1. Fork this gist
  2. On your own copy, go through the listed readings and answer associated questions

You will not be turning this in; it's for your own understanding/learning/benefit 😁

@stephanieguzm
stephanieguzm / reduce.md
Created July 15, 2022 00:20 — forked from aspitz1/reduce.md
Presentation on Array.prototype.reduce()

Array.prototype.reduce()

The reduce() array prototype method uses a user supplied accumulator to calculate all element values into a single value. The call back function will most commonly take in arguments of accumulator, currentValue, where the accumulator is the user supplied value and the currentValue is the value of the array index position that is currently being iterated through. The call back function can also take in index and array where index is the index position of the array currently being iterated through and array is the value of the full array.

The final syntax will look something like this most of the time:

array.reduce((accumulator, variable) => {