View Event Listener Drills
https://repl.it/@ecooper/Cat-carousel-jQuery
https://repl.it/@ecooper/return-of-fizz-buzz
View Analyze a most frequent word program
function getTokens(rawString) {
// NB: `.filter(Boolean)` removes any falsy items from an array
return rawString.toLowerCase().split(/[ ,!.";:-]+/).filter(Boolean).sort();
}
The above code takes the text and strips it down to lower case words with no punctuation, no chance of the counter to confuse upper and lowercase words, and to remove returns, etc as well as creating the array with the list of words.
function mostFrequentWord(text) {
let words = getTokens(text);
The above code takes the text that has been “scrubbed clean” by getTokens function
let wordFrequencies = {};
View Object Drills 2
https://repl.it/@ecooper/Make-student-reports-drill-1
https://repl.it/@ecooper/Enroll-in-summer-school-drill
https://repl.it/@ecooper/find-by-id-drill
https://repl.it/@ecooper/validate-object-keys-drill
View Object Drills
https://repl.it/@ecooper/Object-creator-drill
https://repl.it/@ecooper/Object-updater-drill
https://repl.it/@ecooper/Self-reference-drill-1
https://repl.it/@ecooper/Deleting-keys-drill
View Scope Challenge
What is scope? Your explanation should include the idea of global vs. local scope.
What a variable can do is determined by its location within the code; this is called scope.
Scope also determines the part of the program where the variable is available. JavaScript has two scopes -
global and local. If a variable is outside of a function then it is global and can be accessed from anywhere in the code.
Local scope is when variables are created inside functions and are thus also known as function scope.
Why are global variables avoided?
Global variables should be avoided because they can be changed by any part of the program.
Explain JavaScript's strict mode
View Arrays and Loops Drills
https://repl.it/@ecooper/min-and-max-without-sort-drill
https://repl.it/@ecooper/average-drill
https://repl.it/@ecooper/fizzbuzz-drill-js
View Array Method Drills
https://repl.it/@ecooper/Array-copying-I-drill
https://repl.it/@ecooper/Array-copying-II-drill
https://repl.it/@ecooper/Squares-with-map-drill
https://repl.it/@ecooper/Sort-drill
https://repl.it/@ecooper/Filter-drill
https://repl.it/@ecooper/Find-drill
View Array Basic Drills
https://repl.it/@ecooper/Creating-arrays-drill
https://repl.it/@ecooper/Adding-array-items-drills
https://repl.it/@ecooper/Accessing-array-items-drill
https://repl.it/@ecooper/Array-length-and-access-drill
View Logic Drills
https://repl.it/@ecooper/Traffic-lights-drill
https://repl.it/@ecooper/Error-alert-drill
View Number Drills
https://repl.it/@ecooper/area-of-a-rectangle-drill
https://repl.it/@ecooper/temperature-conversion-drill
https://repl.it/@ecooper/Is-divisible-drill