Zusammenfassung der Ressource
Eloquent JavaScript
- Bindings
- Are attatched to a value/function/data structure
- Values and Operators
- Value types
Anmerkungen:
- VERY important aspect of values:
When a Boolean is required and other type s of values are introduced, the language performs an AUTOMATIC TYPE CONVERSION (0, null, undefined, empty string mean FALSE; anything else means true).
- Booleans
- Strings
- Numbers
- Undefined
- Operator types
- Arithmetic
- Logic
Anmerkungen:
- An important aspect of logical operators: When || and && (binary) operators there is a a protocol that JS follows called 'short circuiting of logical operators'.
When 'and' operator is used the first value is evaluated and if it is false, false remains; if it is 'true' the second value remains no matter if it is true or false.
When 'or' operator is used, the first value is evaluated and if it is true, true remains no matter what the second value is. Contrary case (first value is false), the second one remains no matter what.
- Comparison
- Expressions & Statements
- Expressions produce values
- Statements manipulate values and define structures
- Functions
- 3 Notations
- Binding characteristic
- Scopes
- Recursion and Closure
- Side Effects vs Return values vs Both
- 2 uses
- Control Flow
- Conditionals
- Loops
- Data Structures
- Objects
- Arrays
- Properties, methods, mutability, computing correlation, array
loops, rest parameters, math object, destructure, JSON
- Higher-Order Functions
Anmerkungen:
- They are complex functions that execute a specific task, their name expresses that task so that the programmer can make an 'abstraction' (higher level interpretation) of that function without having to read all of the definition of the function to know what it does.
To define it more specifically: they are functions that receive, modificate or return other functions.
Anlagen:
- They are good for DATA PROCESSING
- filter method
- map method
- reduce method
- Notation for functions returning functions
Anmerkungen:
- expression(argsOuterFunct)(argsReturnedFunct)