Skip to content

Instantly share code, notes, and snippets.

View Schmerb's full-sized avatar

Michael Schmerbeck Schmerb

View GitHub Profile
@Schmerb
Schmerb / PrepcourseCapstone.txt
Last active May 9, 2017 23:27
Capstone Project - High Level Definition
A search engine to quickly and easily find where a specific movie or tv show can be streamed / viewed
and relevant information on those available sources, using the Guidebox API.
https://api.guidebox.com/docs
@Schmerb
Schmerb / String-drills
Created May 22, 2017 18:44
Lesson-2 String drills
Wiseperson
https://repl.it/G8oY/113
Shouter
https://repl.it/G8sD/94
normalizer
https://repl.it/G8sU/54
@Schmerb
Schmerb / number-drills
Created May 22, 2017 18:52
Lesson2 Number Drills
Area
https://repl.it/G9Do/44
Temp
https://repl.it/G9EI/59
Divisible
https://repl.it/G9Ec/55
@Schmerb
Schmerb / logic-drills
Created May 22, 2017 21:56
Lesson 3 Logic
traffic lights
https://repl.it/Ggbk/100
errors
https://repl.it/Ggcp/124
@Schmerb
Schmerb / array-basic-drills
Created May 23, 2017 23:59
Lesson 4 basic array drills
create array
https://repl.it/G9GB/79
adding item to array
https://repl.it/G9GI/69
accessing array items
https://repl.it/G9GO/68
length/access
@Schmerb
Schmerb / arrays-and-loops-drills
Created May 24, 2017 19:18
Lesson 4, arrays and loops drills
min/max
https://repl.it/G9KJ/112
average
https://repl.it/G9KO/85
Fizzbuzz
https://repl.it/G9KW/137
@Schmerb
Schmerb / js-in-my-words
Created May 24, 2017 23:11
Lesson 5 challenge, explaining in my own words
What is scope? (global / local)
Essentially, scope is about the different perspectives for different places in code, i.e. what variables and associated values other functions and variables can "see" or access. Global scope encompases the entirety of source code and even spans across files given the suffienct linking of such files. A variable defined in the global scope will be able to be accessed by anywhere else in the code, including inside functions and other files. Local scope refers to the perspective from inside a function, nested function, or bracketed area of code. Any variables declared inside of a function or nested function are not necessarily accessible in other functions. The scope chain comes into play here. Global scope is at the very top and local scopes exist below it. Variables can only be accessed in a desceding manner in regards to the chain. A variable declared inside a function locally, will not be able to be accessed from places outside of the function, or up the scope chain, but areas
@Schmerb
Schmerb / obj-drills-1
Created May 25, 2017 00:44
Lesson 6 obj drills 1
creator
https://repl.it/G9Lb/84
updater
https://repl.it/G9Lf/71
self-reference
https://repl.it/G9Lj/70
deleting keys
@Schmerb
Schmerb / obj-drills-2
Created May 25, 2017 15:21
Lesson 6 object drills 2
student report
https://repl.it/G9NG/106
enroll in school
https://repl.it/G9N6/81
find by id
https://repl.it/G9OF/57
validate object keys
function getTokens(rawString) {
// NB: `.filter(Boolean)` removes any falsy items from an array
return rawString.toLowerCase().split(/[ ,!.";:-]+/).filter(Boolean).sort(); // returns an array of words in the string using all multiples of white space and punctuation as the delimeter, removing any falsy values from array and finally sorting the array members alphabetically
}
function mostFrequentWord(text) {
var words = getTokens(text); // parses string into array, filtering out any white space or punctuation
var wordFrequencies = {}; // creates an object to store unique words and their frequencies
for (var i = 0; i <= words.length; i++) { // loops through all words in parsed string array