- Install dependencies
yarn install
- Create
server/db.json
file with this contents:
{
"people" : []
}
- Start server
yarn start
- JSON.stringify()
- JSON.parse()
- Simple functions
- Arrow functions
- localStorage.getItem(name)
- localStorage.setItem(name, value)
-
.push() --> Add item to end of array
-
.unshift() --> Add item to beginning of array
-
.shift() --> Remove first element from array
-
.pop() --> Remove last element from array
-
.splice() --> Remove a specific element from array using index
-
.map() --> Creates a new array with the results of calling a provided function on every element in the calling array.
-
.filter() --> Creates a new array with all elements that pass the test implemented by the provided function.
-
.sort() --> Sorts the elements of an array in place and returns the array.
-
.reduce --> Applies a function against an accumulator and each element in the array (from left to right) to reduce it to a single value**.