Skip to content

Instantly share code, notes, and snippets.

View 2stash's full-sized avatar

Dan W 2stash

  • Kohls
  • Rockford Illinois
View GitHub Profile
@2stash
2stash / gist:47082252c745f07ac4709019a8c83ecb
Created February 15, 2020 16:02
JS fundamentals Module 6 solutions
https://repl.it/@2stash/Wiseperson-generator-drill
https://repl.it/@2stash/shouter-drill
https://repl.it/@2stash/text-normalizer-drill
@2stash
2stash / gist:1e4b0957b7cec2566211eb6c4ecd0a81
Created February 15, 2020 16:20
JS fundamentals module 7 solutions
https://repl.it/@2stash/area-of-a-rectangle-drill
https://repl.it/@2stash/temperature-conversion-drill
https://repl.it/@2stash/Is-divisible-drill
@2stash
2stash / gist:fae2063c0bfdd98c2ecf679646547fb5
Created February 15, 2020 16:49
JS fundamentals module 8
https://repl.it/@2stash/Traffic-lights-drill
https://repl.it/@2stash/Error-alert-drill
I combined the console.error and reportError. It works but it doesn't match solution. Is this still correct?
function main() {
try{doAllTheThings();
}
@2stash
2stash / gist:6e08c5fd5f49a8e8dc77de915e4f39c6
Last active February 16, 2020 21:29
JS fundamentals Module 9
https://repl.it/@2stash/Creating-arrays-drill
https://repl.it/@2stash/Adding-array-items-drills
https://repl.it/@2stash/Accessing-array-items-drill
https://repl.it/@2stash/Array-length-and-access-drill
https://repl.it/@2stash/Array-copying-I-drill
https://repl.it/@2stash/Array-copying-II-drill
https://repl.it/@2stash/Squares-with-map-drill
https://repl.it/@2stash/Sort-drill
https://repl.it/@2stash/Filter-drill
@2stash
2stash / gist:cb2dba2c46700d29d2b0dedc6b996269
Last active February 17, 2020 00:49
JS fundamentals Module 10 Loops and arrays
https://repl.it/@2stash/min-and-max-without-sort-drill
https://repl.it/@2stash/average-drill
https://repl.it/@2stash/fizzbuzz-drill-js
@2stash
2stash / gist:9721adf071a24925ec71cc686f590bb0
Created February 17, 2020 14:03
JS Fundamentals Module Variable Scope
Question 1: What is scope? Your explanation should include the idea of global vs. block scope.
Answer: Scope refers to variables and where they are able to be accessed.
A variable with global scope can be accessed anywhere, and modified anywhere.
A variable with block scope can only be accessed in the block, and only modified in the block.
Question 2: Why are global variables avoided?
Answer: Global variables are avoided because they can add hard to fix bugs
because they can be changed accidentally by any function or line of code.
Question 3:Explain JavaScript's strict mode.
Answer: Strict mode makes requires you to use let or const inside all your functions.
Which creates a new variable instead of looking to modify global scope variables.
https://repl.it/@2stash/Object-creator-drill
https://repl.it/@2stash/Object-updater-drill
function updateObject(obj) {
obj.foo = 'foo';
obj.bar = 'bar';
obj.bizz = 'bizz';
obj.bang = 'bang';
return obj;
}
// dont we have to do "const obj = {foo: ''}
headline: Hi my name is Dan.
Bio: After 20 years in the aerospace industry as a project manager,
I finally decided to pursue my true calling and become a fullstack sofware engineer.
Project title: Quiz App
Project description (keep it to one paragraph):
Simple quiz app to demonstrate knowledge of jquery.
1) clients and servers are like libraries and the old duey decimal system.
You know the name of the book(domain) but not where to find it.
So you search the name and get the duey number (IP).
Then you tell the librarian the duey number and they go get it and give it to you.
2)
Client Server Relationship
https://docs.google.com/drawings/d/1Z1frjJNH0HSCP7UpgVvwUimCDYORDP_tIuHj-Xxbbk8/edit?usp=sharing
1) 'part' is required
forChannelID and maxResults are not required
2)
https://maps.googleapis.com/maps/api/geocode/json?address=4879+Cardamon+ln,+Rockford,+IL&key=YOUR_API_KEY
https://maps.googleapis.com/maps/api/geocode/json?address=Statue+of+Liberty+National+Monument,+New+York,+NY&key=YOUR_API_KEY