// jQuery
$(document).ready(function() {
// code
})
A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
Currying is the act of turning a function into a new function that takes slightly fewer arguments, achieving a slightly more specific task.
http://macr.ae/article/es6-and-currying.html
Let's start by making a simple function that will sum up two numbers, using currying:
The spread syntax allows an expression to be expanded in places where multiple arguments (for function calls) or multiple elements (for array literals) or multiple variables (for destructuring assignment) are expected.
Copying an object but replacing some properties:
This one we will need bable to make it work
interface User { | |
id: number; | |
name: string; | |
} | |
// Objects | |
We are going to change the name of the user. We will have three functions: | |
- changeName1 : mutates the object. Bad practice because mutations are a source of bugs hard to find. |