-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathnotes.js
More file actions
37 lines (37 loc) · 2.06 KB
/
notes.js
File metadata and controls
37 lines (37 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* Abstraction:
* - hide details and give us the ability to talk about problems at a higher (or more abstract) level
*
* Abstracting array traversal:
* - The word "traverse" means "to go or travel across or over"
* - It just means you need to iterate (go through each element (an element being a portion of data the
* size of whatever data type the array holds))
*
* Higher-order functions:
* - Functions that operate on other functions, either by taking them as arguments or by returning them
* - If you have already accepted the fact that functions are regular values, there is nothing
* particularly remarkable about the fact that such functions exist. The term comes from mathematics,
* where the distinction between functions and other values is taken more seriously.
* - Higher-order functions allow us to abstract over actions, not just values. They come in several forms
* - ex:
* - you can have functions that change other functions
* - You can even write functions that provide new types of control flow
* - Passing along arguments, which wraps its argument in another function
*
* JSON:
* - JSON (pronounced “Jason”), which stands for JavaScript Object Notation. It is widely used as a data
* storage and communication format on the Web
* - All property names have to be surrounded by double quotes, and only simple data expressions are
* allowed—no function calls, variables, or anything that involves actual computation. Comments are
* not allowed in JSON
* - JavaScript gives us functions, JSON.stringify and JSON.parse, that convert data from and to this format.
* The first takes a JavaScript value and returns a JSON-encoded string. The second takes such a string and
* converts it to the value it encodes.
* - JSON.stringify converts from JavaScript to JSON
* - JSON.parse converts from JSON to JavaScript
*
* Composability:
* - See functionNotes.js or composability.js for explanation
* - Helpful walk through
* src: http://watchandcode.com/courses/eloquent-javascript-the-annotated-version/lectures/206821
*/