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
{ | |
"printWidth": 80, | |
"singleQuote": true, | |
"trailingComma": "all", | |
"write": "src/**/*.js", | |
"jsxBracketSameLine": true | |
} |
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
{ | |
"extends": ["airbnb", "prettier", "prettier/react"], | |
"rules": { | |
"react/jsx-filename-extension": [ | |
"error", | |
{ "extensions": [".js", ".jsx"] } | |
], | |
"react/react-in-jsx-scope": 0, | |
"react/require-default-props": 0, | |
"react/forbid-prop-types": 1, |
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
"workbench.colorCustomizations": { | |
"editorGroup.background": "#FFFFFF", | |
"sideBar.background": "#FFFFFF", | |
"editor.selectionHighlightBackground": "#80CBC470", | |
"editor.selectionBackground": "#80CBC470", | |
"titleBar.activeBackground": "#FFFFFF", | |
"titleBar.inactiveBackground": "#ffffff", | |
"activityBarBadge.background": "#282a2eff", | |
"activityBar.foreground": "#282a2eff", | |
"activityBar.background": "#FFFFFF", |
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
https://www.dropbox.com/sc/xjwlno4wj5moeve/AAAmrRy4yXnnqcGk8eSwj0GXa |
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
https://jsbin.com/zarizom/1/edit?html,js,output | |
https://jsbin.com/zugiyag/1/edit?html,js,output | |
https://jsbin.com/rikuhid/1/edit?html,js,output |
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
function getTokens(rawString) { | |
// NB: `.filter(Boolean)` removes any falsy items from an array | |
/* | |
Passing .split a regular expression will split the string given the regex | |
Any of the characters inside the [] will result in a split. The + indicates that | |
more there may be more than one occurance of any of those characters (to be ignored) | |
array.sort() with no args. sorts according to each character's Unicode code point | |
value (alphabetically ...sorta) |
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
https://jsbin.com/faqeme/2/edit?js,console | |
https://jsbin.com/yecilug/4/edit?js,console | |
https://jsbin.com/gikacu/2/edit?js,console | |
https://jsbin.com/madopo/14/edit?js,console | |
https://jsbin.com/qeqonom/5/edit?js,console |
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
https://jsbin.com/lamuqir/2/edit?js,console | |
https://jsbin.com/nupadar/2/edit?js,console | |
https://jsbin.com/qecixep/2/edit?js,console | |
https://jsbin.com/vopuga/2/edit?js,console |
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
What is scope? | |
John Resig coauthored a book "Secrets of the JavaScript Ninja, second edition" that really solidified my understanding | |
of scope in javascript. Global and local/functional scope is a consequence of lexical environments and execution context (global and functional). If in a function an undeclared variable identifier is referenced, its outer lexical environment is checked for that variable, this is done until the global execution context is reached, if that variable is found, its reference is assigned to the inner identifier, if not, a global variable identifier is created. | |
Why are global variables avoided? | |
Global variable can cause identifier conflicts in a lot of unexpected ways. | |
Explain JavaScript's strict mode. | |
This forces the interpreter to be "more strict" with certain default javascript behaviors. i.e. referencing an undeclared variable from within a function will not create a global variable. |
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
https://jsbin.com/xoyiyah/2/edit?js,console | |
https://jsbin.com/zidoqef/2/edit?js,console | |
https://jsbin.com/debafi/6/edit?js,console |
NewerOlder