Skip to content

Instantly share code, notes, and snippets.

View 821jieun's full-sized avatar

jieun 821jieun

  • nyc
View GitHub Profile
@821jieun
821jieun / gist:fc4d0229485cae77b83ff8b7ae385ce4
Created February 14, 2018 15:38
Links to string drills
https://repl.it/@jieun/text-normalizer-drill
https://repl.it/@jieun/Wiseperson-generator-drill
https://repl.it/@jieun/shouter-drill
https://repl.it/@jieun/Is-divisible-drill
https://repl.it/@jieun/temperature-conversion-drill
https://repl.it/@jieun/area-of-a-rectangle-drill
http://jieun.repl.co/Error-alert-drill/
http://jieun.repl.co/Traffic-lights-drill/
https://repl.it/@jieun/Adding-array-items-drills
https://repl.it/@jieun/Accessing-array-items-drill
https://repl.it/@jieun/Array-length-and-access-drill
https://repl.it/@jieun/Find-drill
https://repl.it/@jieun/Filter-drill
https://repl.it/@jieun/Sort-drill
https://repl.it/@jieun/Squares-with-map-drill
https://repl.it/@jieun/Array-copying-II-drill
https://repl.it/@jieun/Array-copying-I-drill
@821jieun
821jieun / gist:bd4c6304491debb32c34147147479e28
Created February 14, 2018 17:07
Arrays and Loops Drills
https://courses.thinkful.com/web-dev-001v1/project/2.4.6
https://repl.it/@jieun/average-drill
https://repl.it/@jieun/min-and-max-without-sort-drill
@821jieun
821jieun / gist:7f18fb0c20853bd023629bcf7b12dd89
Created February 14, 2018 18:12
Challenge: in your own words
What is scope? Your explanation should include the idea of global vs. local scope.
Scope is the area in which a variable is available.
Local scope is when the variable is defined and used within a specific function. Local scope is re-created
each time the function is called.
Global scope is when the variable is defined outside of a function.
The interpreter follows a scope chain to check the availability of a variable. It will first check local scope;
then it will check parent scope; then it will check the global scope.
Why are global variables avoided?
Use of global variables can make a function indeterminate. This means that a when a function is given the same input
https://repl.it/@jieun/Deleting-keys-drill
https://repl.it/@jieun/Self-reference-drill
https://repl.it/@jieun/Object-creator-drill
https://repl.it/@jieun/Object-updater-drill
https://repl.it/@jieun/validate-object-keys-drill
https://repl.it/@jieun/find-by-id-drill
https://repl.it/@jieun/Enroll-in-summer-school-drill
https://repl.it/@jieun/Make-student-reports-drill-1
@821jieun
821jieun / gist:611089050e21047f3a552cbe458918f1
Created February 14, 2018 20:23
most frequent word analyzer challenge
function getTokens(rawString) {
// NB: `.filter(Boolean)` removes any falsy items from an array
return rawString.toLowerCase().split(/[ ,!.";:-]+/).filter(Boolean).sort();
//all capitalized letters are turned into lower case letters in the raw string.
//that all lower case string is then being split where punctuation marks are found.
//falsy items are removed.
//the string is then sorted alphabetically and is the return value of the getTokens function call.
}