(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| const countBits = (n) => n.toString(2).split('').filter(e => e === '1').length |
| function destroyer(arr) { | |
| const destroyArgs = [...arguments].slice(1) | |
| return arguments[0].filter((val) => { | |
| return !destroyArgs.includes(val) | |
| }) | |
| } | |
| // const destroyer = (arr, ...valsToRemove) => arr.filter(elem => !valsToRemove.includes(elem)); |
| function diffArray(arr1, arr2) { | |
| return [...arguments].reduce((a, c) => { | |
| if (!arr1.includes(c) || !arr2.includes(c)) { a.push(c) } | |
| return a | |
| }, []) | |
| } | |
| console.log(diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5])) // [ 4 ] |
| const arr = N => Array.from({ length: N }, (_, i) => i) | |
| // Notice that the first parameter of the function is the "length" just as when you get the arr.length , you define it. | |
| // And the second parameter is the mapping function. | |
| // Since our new array does not have items within it, we skip the first argument with _ and take the index i to return it => i as it will follow the linear increasing logic 0, 1, 2... |
| Data Structures | |
| - Stacks | |
| - Queues | |
| - Linked lists | |
| - Graphs | |
| - Trees | |
| - Tries | |
| Concepts | |
| - Big O Notation |
| HTML | |
| - Semantic HTML | |
| - Event delegation | |
| - Accessibility / ARIA | |
| CSS | |
| - Specificity | |
| - Pseudo-elements | |
| - Pseudo-selectors | |
| - Combinators |