Fun SQL commands
check (Value > x value) check (value <= x value) /// This allows you to limit the selected values to display
select avg (value) from (table) // Gives an average of the selected values
selectcount() from (table) where column ='value' // Counts the amounts of elements in an array or table that have certain properties.
Uploading our Repls to GIT
--> We are creating a new repo that has the code we have typed in REPL. In order to do this, we copy and paste the HTML, CSS, and JS from the REPL.
--> EsLint calls out several formatting bad practices that most of them were solved by saving the file. There were still a bunch of hoisting "complains" that got solved by moving the functions to the top of the file.
--> We don't need to use cors-anywhere, nor the back end in the repl since we are using our server to fetch data. WE can only relate to the /tasks
--> In order to relate to the public folder and all the front end files within we need to type in the following code in the index.js:
app.use(express.json())
app.use(express.static('public'))
Today's important Notes:
We need to have script js. and index js. Script runs in the browser of the person visiting the webpage. , index js relates to the server where your files are running.
Given the following const:
const city {name: Miami, population: 10000}
The following are equivalent const statements
const name = city.name
const {name} = city
To show the element added into a table we need to use the following code:
returning *
Afternoon Exercise
Fun SQL commands check (Value > x value) check (value <= x value) /// This allows you to limit the selected values to display select avg (value) from (table) // Gives an average of the selected values select count() from (table) where column ='value' // Counts the amounts of elements in an array or table that have certain properties.
Uploading our Repls to GIT
--> We are creating a new repo that has the code we have typed in REPL. In order to do this, we copy and paste the HTML, CSS, and JS from the REPL.
--> EsLint calls out several formatting bad practices that most of them were solved by saving the file. There were still a bunch of hoisting "complains" that got solved by moving the functions to the top of the file.
--> We don't need to use cors-anywhere, nor the back end in the repl since we are using our server to fetch data. WE can only relate to the /tasks
--> In order to relate to the public folder and all the front end files within we need to type in the following code in the index.js: app.use(express.json()) app.use(express.static('public'))
Today's important Notes:
We need to have script js. and index js. Script runs in the browser of the person visiting the webpage. , index js relates to the server where your files are running.
Given the following const: const city {name: Miami, population: 10000}
The following are equivalent const statements const name = city.name const {name} = city