| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
| // @param {function} f The function to execute when DOM is ready | |
| function a(f,o,m){o=document,m='addEventListener';o[m]?o[m]('DOMContentLoaded',f):(o=window,o.attachEvent('onload',f));} |
| node_modules |
| /** | |
| * Creates a read/writable property which returns a function set for write/set (assignment) | |
| * and read/get access on a variable | |
| * | |
| * @param {Any} value initial value of the property | |
| */ | |
| function createProperty(value) { | |
| var _value = value; | |
| /** |
While attempting to explain JavaScript's reduce method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.
JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it much simpler to think about both the old list and the new one, what they contain, and
- A Complete Guide to Flexbox | CSS-Tricks
- Bar Navigation with Flexbox and SVG icons - CodePen
- flexbox in the real world
- Flexbox Based Responsive Equal Height Blocks With JavaScript Fallback — Osvaldas Valutis
- Dando los primeros pasos con FlexBox: La caja flexible con CSS3 - Blog - [Desarrollo Libre]
- Putting Flexbox into Practice presentation at Blend Conference
- Flexbox Tutorial
- flexbox in 5 minutes
If you rushed through David Shariff's JS Quiz or are just new to JS they might be. I know mine were. After I dried my eyes, I took the quiz again, this time very slowly trying to get at the meat behind each answer. Below is my attempt to explain each question's answer and offer some interesting permutations so that others can move beyond their hurt feelings and come out the other side better JS developers.
I initially thought I'd turn this into a blog post but think it's probably better as a gist.
Don't over think it.
var foo = function foo() {
If you rushed through David Shariff's JS Quiz or are just new to JS they might be. I know mine were. After I dried my eyes, I took the quiz again, this time very slowly trying to get at the meat behind each answer. Below is my attempt to explain each question's answer and offer some interesting permutations so that others can move beyond their hurt feelings and come out the other side better JS developers.
I initially thought I'd turn this into a blog post but think it's probably better as a gist.
Don't over think it.
var foo = function foo() {
| Hex Opacity Values | |
| 100% — FF | |
| 95% — F2 | |
| 90% — E6 | |
| 85% — D9 | |
| 80% — CC | |
| 75% — BF | |
| 70% — B3 | |
| 65% — A6 |
| const returnsAPromise = (string) => ( | |
| new Promise((resolve, reject) => { | |
| if (typeof string !== 'string') reject('Not a string!'); | |
| resolve(`String is a resolved promise now: ${string}`); | |
| }) | |
| ); | |
| const myString = "Kait's string"; | |
| let isOurPromiseFinished = false; |