Monday April 11
Interruptions & Events
- 1 on 1 scheduling
Motivation Monday!!!
Daily JS
Write a function replace
that takes two arguments: an array and an item
with an id
property.
Using reduce
, return a new array where the item with a matching id
to the passed in item is replaced with the new version.
Example:
arr
:[{id: 1, name: `Homer`}, {id: 20, name: `Ned`}, {id: 15, name: `Marge`}]
item
:{id: 20, name: `Maude`}
Result ofreplace(arr, item)
[{id: 1, name: `Homer`}, {id: 20, name: `Maude`}, {id: 15, name: `Marge`}]
function replace(arr, item) {
return arr.reduce()
}
Topics
- Review Jumping in to Ember projects
- Route Definitions
- Outlets
- Services
- Store Reducer
- Loading States
Code
Videos
These are long!!! Use them wisely! Maybe check in the code, see what you want explaination about and scrub the video to find when we wrote that!