Skip to content

Instantly share code, notes, and snippets.

View Schmerb's full-sized avatar

Michael Schmerbeck Schmerb

View GitHub Profile
Wiseperson
https://jsbin.com/yufawuj/edit?html,js,console
Shouter
https://jsbin.com/yoqimo/edit?html,js,console
Normalizer
https://jsbin.com/tedodom/edit?html,js,console
@Schmerb
Schmerb / NumberDrills
Created April 22, 2017 18:13
Number Drills
Area
https://jsbin.com/qububip/edit?html,js,console
temp conversion
https://jsbin.com/najaze/edit?html,js,console
is Divisible
https://jsbin.com/tuyojek/edit?html,js,console
@Schmerb
Schmerb / LogicDrills
Created April 22, 2017 20:59
Logic Drills
Traffic lights
https://jsbin.com/vusiveg/edit?html,css,js,output
Handle errors
https://jsbin.com/panapo/2/edit?html,css,js,output
createArray
https://jsbin.com/roxuje/2/edit?html,js,console
Adding to array
note: list.push(item) method did not function as lesson described, would not work, outputted the array size not actual array members
https://jsbin.com/vobukal/16/edit?html,js,console
Access
https://jsbin.com/kemenal/2/edit?html,js,console
max/min without sort
https://jsbin.com/rojudog/3/edit?html,js,console
compute ave
https://jsbin.com/ricezuy/3/edit?html,js,console
FizzBuzz
https://jsbin.com/jukehiq/3/edit?html,js,console
@Schmerb
Schmerb / lesson-5-challenge
Created April 23, 2017 01:12
Brief rundown of scope in JavaScript.
What is scope?
Scope refers to the part of your program / source code that a given variable can 'see'. In other words,
scope defines which variables (and specific values) functions or variables both within and outside of
functions have access to. There are two distinct types of scope, global (also known as 'window' scope)
and local scope.
The global scope consists of the entire source file and can even stretch across multiple
files given those files are loaded properly into an html file. Global variables are accessible from anywhere
within the file(s) including inside of functions or nested-functions. The local scope refers to variables
that have been declared inside of a function (nested-function) and thus only those variables can be accessed
by other variables or functions within the same part of the code. Thus, a variable defined locally inside of one
obj creator
https://jsbin.com/gonani/2/edit?html,js,console
update obj
https://jsbin.com/duzoham/2/edit?html,js,console
self-reference
https://jsbin.com/lucifoq/3/edit?html,js,console
delete
student reports
https://jsbin.com/mawanow/3/edit?html,js,console
summer school
https://jsbin.com/tulurig/2/edit?html,js,console
find by id
https://jsbin.com/wekibi/3/edit?html,js,console
validate object keys
Overall functionality:
mostFrequentWord(string) --> @return: returns the word that appears the most in a given string;
First, function calls a getTokens(text) method on some string 'text'.
This getTokens method returns an array of the words found in the string passed as an argument transofrming all
characters to lower case, using any numbers of white space, commas, exclamation points, periods, quotation marks,
semi-colons, colons, or dashes in any frequency as the delimiter to determine where each word begins/ends, removes falsy
items and sorts the words alphabetically.
--> tl:dr strips just the words consisting of letters A-Za-z9-0 into an array
cat carousel
https://jsbin.com/fegaku/10/edit?html,css,js,console,output
FizzBuzz
https://jsbin.com/hacudut/22/edit?html,js,console,output
Bulb-on
https://jsbin.com/busoja/3/edit?html,css,js,output