Skip to content

Instantly share code, notes, and snippets.

https://repl.it/@Chayce/Wiseperson-generator-drill
https://repl.it/@thinkful/Shouter-solution
https://repl.it/@Chayce/text-normalizer-drill
https://repl.it/@Chayce/Is-divisible-drill
https://repl.it/@Chayce/temperature-conversion-drill
*didn't get the temp drill correct
https://repl.it/@Chayce/area-of-a-rectangle-drill
https://repl.it/@Chayce/Traffic-lights-drill
https://repl.it/@Chayce/Error-alert-drill
What is scope?
"Scope" describes the the scope and limitations of impact that a variable can have on the overall code and program. The scope of a variable is
dependent on how and where it is defined or declared. A variable defined outside a fucntion will have "global scope" and can effect
the entire program; a variable defined within a function will have "block scope" and will be limited to it's particular block of code.
Why are global variables avoided?
A variable with "global scope" can effect the entire program whereas a variable
with "block scope" is contained within it's particular block of code, so can be controlled more specifically. "Block scope"
On line 7, the variable “words” is created. The text is trimmed down to only lower case words with no punctuation by the getTokens function.
Line 8 wordFrequencies is declared as a function
Line 9-15 the text is checked to see if a word is repeated and if so how many times.
Line 16 the word used with the most frequency is placed in the first position of an array
Line 17 the maxCount is declared as the number of times a word is used
On line 7, the variable “words” is created. The text is trimmed down to only lower case words with no punctuation by the getTokens function.
Line 8 wordFrequencies is declared as a function
Line 9-15 the text is checked to see if a word is repeated and if so how many times.
Line 9 iterate over the array of words // starting the count at zero
Line 10 for each element in the words array, check to see if it already exists in the wordFrequencies object
@challey17
challey17 / quizapp
Last active December 17, 2019 06:11
halsdkjfasdlk
@challey17
challey17 / bio.txt
Last active January 3, 2020 01:58
bio etc for portfolio
Headline
I am a fullstack software developer with a passion for design and functionality.
Bio
I am fullstack software developer with experience working with react and node.js. My passion is creating intelligent well-designed applications that work at a high level and offer ease of use and accessibility. I am passionate about learning and growing as a developer.
@challey17
challey17 / layout.txt
Last active January 5, 2020 17:57
PORTFOLIO LAYOUT
Portfolio Layout
@challey17
challey17 / clients.txt
Last active January 13, 2020 04:56
CLIENTS AND SERVERS
On the relationship between clients and servers in computer science and web development:
A simple analogy would be to compare the client/server relationship on the web to the customer/waiter relationship in a
restaurant.
A client is like customer and the server is like the waiter in the restaurant. The customer makes a request to the waiter to deliver something from the kitchen. The waiter (the server) then delivers what was requested or tells the customer (client) that it is currently unavailable for whatever reason.
But with clients and servers the client initially requests the html file and then requests all additional resources specified in the html file, building the entire web page.
So our waiter in the analogy would bring out the individual ingredients as the customer requests them until the whole meal is put together.