A list of the gists that have proved most useful to new JS devs on GitHub.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AbstractControl, FormArray, FormGroup } from '@angular/forms'; | |
import { map, toPairs, fromPairs, differenceWith, isEqual, isNull, isUndefined } from 'lodash'; | |
import { Observable, OperatorFunction, defer, empty, of, merge, pipe } from 'rxjs'; | |
import { distinctUntilChanged, filter, map, shareReplay, pairwise } from 'rxjs/operators'; | |
/** | |
* Convenience RxJS operator that filters out undefined & null and modifies the downstream type | |
* appropriately. | |
*/ | |
export function exists<T>(): OperatorFunction<T | undefined | null, T> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTML | |
- Semantic HTML | |
- Event delegation | |
- Accessibility / ARIA | |
CSS | |
- Specificity | |
- Pseudo-elements | |
- Pseudo-selectors | |
- Combinators |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ids = []; | |
const data = ['139', '576']; | |
data.map(id => ids.push(Math.max(...id))); | |
// What's the output? | |
console.log(ids); |
Free to read online: exploringjs.com/impatient-js/
- The exercises now run as native ESM modules on Node.js. Previously, they were run via the
esm
package. - Material on new ES2021 features:
String.prototype.replaceAll()
Promise.any()
- Logical assignment operators
- Underscores (
_
) as separators in number literals and bigint literals
OlderNewer