Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
View Questions about jQuery
What is jQuery for? helps you traverse and manipulate web apps
How do you get access to all mulitiple elements? Using $() command
What is DOM? Documentation object model
View most frequent word analyzer
get tokens tokenizes the string
loop through each word and if this is the first time seeing it make the counter for it 1, otherwise increment the counter by 1
loop through the word freq array and save the word that has the highest freq
output word with highest freq
View Object Drills 2
View Object Drills 1
View Scope vs global variables
1. Scope is a term that allows to know where certain variables can be used. If the scope of variable is global it can be used anywhere
in your code. If the scope of the variable is block it can only be used in the block it was created.
2.Global Variables are avoided since they can cause unintended consequences/side effects.
3.JavaScript's strict mode makes sure that global variables can't be used.
4. A side effect is when a function affects things outside its own scope and changes the values in a completely different block/scope.
A pure function is one that doesnt have any side effects and it is determinate.
View Arrays and Loops Drills
View Array Method Drills
View Array Basics
View Logic Drills
View Number Drills