Skip to content

Instantly share code, notes, and snippets.

@amrvitale
amrvitale / gist:0ba812ab8c5a1ca8465c5c29a36320b2
Created August 22, 2019 07:18
String drills for Bloc: JS Fundamentals, Checkpoint 6
https://repl.it/@AngelaBumgarner/Wiseperson-generator-drill
https://repl.it/@AngelaBumgarner/shouter-drill
https://repl.it/@AngelaBumgarner/text-normalizer-drill - this one I'm confused because using Dev Tools, it works but the test code says it fails...
@amrvitale
amrvitale / gist:84e8ef9ce91a98c553387343a3b01852
Created August 23, 2019 01:33
JavaScript Fundamentals: Checkpoint 7: Working with Numbers
https://repl.it/@AngelaBumgarner/area-of-a-rectangle-drill
https://repl.it/@AngelaBumgarner/temperature-conversion-drill
https://repl.it/@AngelaBumgarner/Is-divisible-drill
https://repl.it/@AngelaBumgarner/Traffic-lights-drill
https://repl.it/@AngelaBumgarner/Error-alert-drill
Array basics drills:
https://repl.it/@AngelaBumgarner/Creating-arrays-drill
https://repl.it/@AngelaBumgarner/Adding-array-items-drills
https://repl.it/@AngelaBumgarner/Accessing-array-items-drill
https://repl.it/@AngelaBumgarner/Array-length-and-access-drill
Array method drills:
https://repl.it/@AngelaBumgarner/Array-copying-I-drill Please see comments!
https://repl.it/@AngelaBumgarner/Array-copying-II-drill
https://repl.it/@AngelaBumgarner/Squares-with-map-drill
What is scope? Your explanation should include the idea of global vs. block scope.
//Scope: term that refers to the location and accessibility of a variable declaration. There are different types of variable scope,
//meaning that there are different locations where a variable can be declared and therefore, levels of "accessibility."
//Global scope refers to variables that are accessible (and can be changed/muted) from anywhere in your code. If the variable is
//declared outside of a function, it has global scope.
//Block scope refers to variables that are declared inside a function. A variable with block scope is only accessible
//within the function. Block scoped variables will not change any global variables.
https://repl.it/@AngelaBumgarner/Object-creator-drill
//AB: question - why doesn't foo need single quotes but olly olly does? Is it because of the space?
https://repl.it/@AngelaBumgarner/Object-updater-drill
//AB: calling this function just gives me an 'undefined' error. Is this because of 'side effects'?
//If so, can we discuss what's happening in this function?
https://repl.it/@AngelaBumgarner/Self-reference-drill
https://repl.it/@AngelaBumgarner/Deleting-keys-drill
@amrvitale
amrvitale / CSS content box question
Created November 3, 2019 20:59
How much space does the element take up?
//How much space does this element take up, assuming we use the default setting for box-sixing?
//Default setting for box-sizing is content-box (per W3).
div {
border: 6px solid #949599;
height: 100px;
margin: 20px;
padding: 20px;
width: 400px;
Good use case for hiding an element?
Good use case for deleting an element?
Is deleting different from hiding?
Per https://repl.it/@AngelaBumgarner/jquery-traversal-example, you can remove the "js" portion when targeting it for CSS only?
See li class js-complete and then .complete in CSS
How do screen readers interact with hidden elements?
@amrvitale
amrvitale / Pseudocode for Shopping List
Created December 10, 2019 04:08
Shopping List Pseudocode for 3 Remaining User Stories: Add Items, Check/Uncheck Items, Delete Items
function handleNewItemSubmit() {
// this function will be responsible for when users add a new shopping list item
//AB: For each item added in STORE, generate a string representing an <li> with
--the item name
-- check button
-- delete button
console.log('`handleNewItemSubmit` ran');
}