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
| Project: | |
| Exploring the world | |
| Purpose: | |
| This APP is designed for the users who either want to look up a traveling destination or gain some information for their trip | |
| APIs: |
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
| Task: Construct the full URLs to get | |
| (1)The Statue of Liberty | |
| https://maps.googleapis.com/maps/api/geocode/JSON?key=My_API_Key&api=1&query=The+Statue+of+Liberty | |
| (2) My address | |
| https://maps.googleapis.com/maps/api/geocode/JSON?key&=api=1&query=2560+sunscape+lane%2C+Dallas%2C+Texas | |
| Resources: | |
| https://developers.google.com/maps/documentation/urls/guide | |
| https://developers.google.com/maps/documentation/javascript/get-api-key |
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
| I watched a video about how API worked (https://www.youtube.com/watch?v=s7wmiS2mSXY), in which the narrator compared API as the waiter, users as the clients, and systems as the kitchen. Here I will use the same analogy to compare the “clients” and “servers” on the Internet. The clients, which are the front-end browsers, can be viewed as the customers in the restaurant. When they know what to order, they will either go to the front desk to order or ask a waiter(API), depending on the rules in the restaurant(the web), which refers to the HTTP protocol. When the kitchen, which is the server, gets the request, the kitchen will prepare for what the customers want or tell the customer if something is out of order, and then depending on the rules the customers will get their order either from a waiter or from the front desk. |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Emily Stacy Portfolio</title> | |
| <link href="index.css" rel="stylesheet" type="text/css"/> | |
| <link href="https://fonts.googleapis.com/css?family=Metrophobic" rel="stylesheet"> | |
| <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css" integrity="sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz" | |
| crossorigin="anonymous"> |
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
| # Terminal Cheat Sheet | |
| pwd # print working directory | |
| ls # list files in directory | |
| cd # change directory | |
| ~ # home directory | |
| .. # up one directory | |
| - # previous working directory | |
| help # get help | |
| -h # get help |
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: | |
| Ni Hao(Hello)! I am Emily. I am a front-end developer and instructional designer who enjoy coding and finding balance between design and development | |
| Bio: | |
| I am passionate about teaching and analyzing structures of languages. I have been teaching Mandarin Chinese in US for over seven years, and since 2016 I have discovered my passion for front-end and instructional design. To expand my skills I joined the bloc to start in web development in 2019. I believe my experiences in instructional and web design paired with my multicultural background will be invaluable. | |
| Traveling and building new habits are two big things for me. I am an extroverted introvert. You can find me either staying outside to participate in gym classes or meeting friends (or both) the whole day, or staying home trying new recipes or reading all day long. | |
| Contact info: | |
| Email address: [email protected] |
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 STORE = [ | |
| { | |
| number: 1, | |
| question: 'In the TV show “fresh off the boat” which character is actually the writer of the original novel?', | |
| answers: [ | |
| 'Eddie Huang', | |
| 'Emery Huang', | |
| 'Evan Huang', | |
| 'Louis Huang' | |
| ], |
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 | |
| // the argument rawstring will return lowercase | |
| // ",!.";:-]+/ is regex(regular expressions)It helps to find all all the symobls in strings: , ! . "";: - | |
| //After the symbols are found, they will be omitted and the strings will be split and an array will be formed | |
| //use filter(Boolean)to remove null or empty values | |
| //use.sort to arrange the strings in alphabetic order | |
| return rawString.toLowerCase().split(/[ ,!.";:-]+/).filter(Boolean).sort(); | |
| } |
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
| onst sampleObj = { | |
| foo: 'foo', | |
| bar: 'bar', | |
| bizz: 'bizz', | |
| bang: 'bang', | |
| }; | |
| function keyDeleter(obj) { | |
| obj= sampleObj; | |
| delete obj.foo; |
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.What is scope? Your explanation should include the idea of global vs. block scope. | |
| Answer: Scope itself means “extent,” and in coding scope defines the extent of the variables. In other words, whether variables can be read and used in more than one function depends on scope. With this concept in mind, variables with “global scope” are those who are declared out of functions, and they will not use prefixes like “const” or “let”. Global scope allows the variable to be accessed anywhere in the Javascript file, sometimes even in different files. On the other hand, “block scope” limits the variables to only work in the assigned functions. The scope chain in programming causes the two situations. Take JavaScript as an example, the system will look for the variable in the current function. If the variable is not defined, it will look up to other functions or the parent file, and that is how global scope happens. Having variables in block scope is recommended because in this way the variables will not inadvertentl |
NewerOlder