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 restaurants | |
| Write a query that returns all of the restaurants, with all of the fields. | |
| knex | |
| .select() | |
| .from('restaurants') | |
| .then(results => console.log(JSON.stringify(results, null, 2))); | |
| 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
| https://gist.github.com/MitchGianoni/70d4863fdc8b0ce97dc4a9b3712e17e7 |
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 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
| // ================================================================================ | |
| // You will be writing a series of functions beneath each block of comments below. | |
| // Tackle each function one at a time. You may move on to a new exercise and return | |
| // later. Run the code and the console to the right will tell you if your function | |
| // is successfully passing the tests. | |
| // ================================================================================ | |
| /* | |
| Define a function named `kmToMiles` that receives one parameter: |
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://repl.it/@keithnull/Object-creator-drill | |
| https://repl.it/@keithnull/Object-updater-drill | |
| https://repl.it/@keithnull/Self-reference-drill | |
| https://repl.it/@keithnull/Deleting-keys-drill |
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 is scope? | |
| In the context of variables and their values, scope can be thought of as the range in which a particular variable and its accompanying assigned value are effective. | |
| In otherwords, scope is the space within which a variable operates. | |
| This space can be defined as global or local: a globally scoped variable will be accessible to all functions, everywhere in a program while a locally scoped variable will only be accesible within the function it resides in. | |
| In Javascript, when a variable is called in a function the program first looks in the local function to see if the variable is defined; if not it looks in the global scope. | |
| If there are two variables with the same name - one local, one global - then the local variable will take precedence within the function it resides in, | |
| but outside of that function the global variable will retain it's assigned value. |
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://repl.it/@keithnull/min-and-max-without-sort-drill | |
| https://repl.it/@keithnull/average-drill | |
| https://repl.it/@keithnull/fizzbuzz-drill-js |
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://repl.it/@keithnull/Array-copying-I-drill | |
| https://repl.it/@keithnull/Array-copying-II-drill | |
| https://repl.it/@keithnull/Squares-with-map-drill | |
| https://repl.it/@keithnull/Sort-drill | |
| https://repl.it/@keithnull/Filter-drill | |
| https://repl.it/@keithnull/Find-drill |
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://repl.it/@keithnull/Creating-arrays-drill | |
| function makeList(item1, item2, item3) { | |
| // your code here | |
| const myArray = [item1,item2,item3]; | |
| return myArray | |
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://repl.it/@keithnull/Traffic-lights-drill | |
| function doTrafficLights() { | |
| const activeLight = getActiveLight(); | |
| // your code will replace this call | |
| // to `console.log()` | |
| console.log(activeLight); | |
| if(activeLight === 'red'){ | |