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) Get all the restaurants. | |
| Write a query that returns all of the restaurants, with all of the fields. | |
| knex.select('id', 'name', 'borough', 'cuisine') | |
| .from('restaurants') | |
| .then(results => console.log(JSON.stringify(results, null, 4))); | |
| 2) Get Italian restaurants | |
| Write a query that returns all of the Italian restaurants, with all of the fields |
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) Get all the restaurants. | |
| Write a query that returns all of the restaurants, with all of the fields. | |
| SELECT * FROM restaurants; | |
| 2) Get Italian restaurants | |
| Write a query that returns all of the Italian restaurants, with all of the fields | |
| SELECT * FROM restaurants WHERE cuisine = 'Italian'; | |
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
| DOCUMENTATION | |
| mongoDB Query and Projection Operators | |
| https://docs.mongodb.com/v3.2/reference/operator/query/ | |
| mongoDB Shell Methods | |
| https://docs.mongodb.com/v3.2/reference/method/#collection | |
| 1) Build a query to filter the data set. Find all of the restaurants which have: |
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
| Get all | |
| db.restaurants.find(); | |
| Limit and sort | |
| db.restaurants. | |
| find(). |
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
| Request & Response Drills: | |
| - Mad Lib Generator | |
| https://glitch.com/edit/#!/project/sequoia-windshield | |
| Q's for Mentor: 1. Discuss the code format. | |
| - A/B Test |
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
| http://jsbin.com/yidatujole/edit?js,console,output |
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
| Retouch definitions of Unit 1 & 2 |
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
| Most frequent word: | |
| https://jsbin.com/bebedun/edit?js,console | |
| Data merge: | |
| https://jsbin.com/nocote/edit?js,console | |
| Recipe Factory: | |
| https://jsbin.com/wasupoz/edit?js,output |
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
| Object Creator : | |
| https://jsbin.com/xacoqun/edit?js,console | |
| Object updater: | |
| https://jsbin.com/qenowa/edit?js,console | |
| Self reference: | |
| https://jsbin.com/vurugis/edit?js,console | |
| Deleting keys: |
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
| Questions: | |
| 1. What is scope? Your explanation should include the idea of global vs. local scope. | |
| 2. Why are global variables avoided? | |
| 3. Explain JavaScript's strict mode | |
| 4. What are side effects, and what is a pure function? | |
| 5. Explain variable hoisting in JavaScript. | |
| 1. Scope is what determines which parts of the code can access certain variables | |
| Global vs. local: Global scope is everywhere and is declared outside of a function. |