This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Scope is where a variable can be accessed from in your program. Block scope means that the variable can only be accessed from within the block where it is declared. Whereas variables with global scope can be accessed from anywhere in the program. | |
| Global variables are usually avoided due to the unintended side effects that can happen, which can often lead to bugs. Side effects are when a variable in a function reaches out of the local scope and changes the value of the global variable. | |
| This can cause a function to become indeterminate, which means that it returns different values despite having the same inputs. A pure function is determinate, always returning the same values for the sames inputs, and has no side effects, so only changes variables within the local scope. | |
| Strict mode triggers an error whenever a function is declared without let or const. It prevents you from accidentally declaring a global variable within a function. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getTokens(rawString) { | |
| // NB: `.filter(Boolean)` removes any falsy items from an array | |
| return rawString.toLowerCase().split(/[ ,!.";:-]+/).filter(Boolean).sort(); | |
| //converts all the letters in the string to lowercase, splits the string into an array of individual words, removes any falsy items, and sorts it all alphabetically. | |
| } | |
| function mostFrequentWord(text) { | |
| let words = getTokens(text); | |
| //calls the function getTokens and assigns the output to words | |
| //makes words an array of the individual words from the argument, sorted alphabetically, in lowercase and without punctuation or spaces |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| What are the ways that jQuery can be used to manipulate the appearance of a web page? | |
| How do you use jQuery to add additional text to a web page? | |
| Do you need to link to jQuery in the html file? | |
| Is jQuery the only way you can interact with the DOM? | |
| How would you extract information from forms with jQuery? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Publishing a project page for a project with existing repository | |
| //Make sure you are in the local project repo | |
| $ git checkout -b gh-pages | |
| $ git push origin gh-pages | |
| Keep gh-pages up to date with a master branch | |
| // Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/ | |
| $ git add . | |
| $ git status // to see what changes are going to be commited |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| addItems(){ | |
| //Get imput value from the form | |
| //Take the input value and put it in an object that is added to the array STORE | |
| //STORE.push({name: item, checked: false}) | |
| } | |
| checkItems(){ | |
| //use event listener on the check button | |
| //change the value for the item in STORE from checked: false to checked: true | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const questions = [ | |
| { //Question 1 | |
| text: "Μῆνιν ἄειδε, θεά, Πηληϊάδεω Ἀχιλῆος is the opening line of a famous work." | |
| + "What is that work called?", | |
| answers: [ | |
| { | |
| text: "Seven Against Thebes", | |
| correct: false | |
| }, | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://coleenhuang.github.io/Ancient-Greece-quiz/greek-quiz-app | |
| https://github.com/coleenhuang/Ancient-Greece-quiz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Headline | |
| Hi, I’m Coleen Huang. I’m a web developer based in the Sacramento Area. | |
| Bio | |
| If you asked any of my friends to describe me, they would say that I’m a bibliophile, avid baker and someone who loves trying out different things. | |
| I love coding, not only because of the opportunities that it gives me to learn and experiment, but also the satisfaction that I feel when I see my ideas come to life. I often feel like I never have time, as there’s so much that I want to learn. The current things that I’m working on mastering are coding, calligraphy and Ancient Greek. | |
| Projects | |
| Project title: Ancient Greece quiz app | |
| Project description: Inspired by my love for Classics and Ancient Greece, I created this quiz app to test people on trivia about Ancient Greece |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Clients are the people in the library, doing research, while the server is the library, which provides the books and information that the clients request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Yes, most requests require authentication | |
| 2. Yes, CORS is supported by the API. | |
| 3. The response format is in JSON. | |
| 4. The limitation is that if you make too many requests in a short time frame you get throttled, but if this continues to happen you eventually get blocked. | |
| 5. The erros expected are: 400 Bad Request, 401 Unauthorized, 429 Too Many Requests, 500 Internal Server Error. |
OlderNewer