Code Fellows courses Notes
This project is maintained by QamarAlkhatib
according of what I know through the class:
If its state change, like opening the modal or closing it. we can know that there is a functions behind the scene to handle this.
in the code, we can know it from the constructor in ```this.state``
also, if we are doing the state on a modal we will know that the parent pass the state as this.state
to its child, and the child use it as a props. for the functionality.
For each piece of state in your application:
Functions that operate on other functions, either by taking them as arguments or by returning them
greaterThan function create a new function to check if the value grater than the input one.
line 2 creates a new function that check the current value and the input one.
function greaterThan(n) {
return m => m > n;
}
let greaterThan10 = greaterThan(10);
console.log(greaterThan10(11));
// → true