master
Thom Page 10 years ago
parent a59b27e32e
commit e1129f9075

@ -39,7 +39,7 @@ The app will also be able to store new vampires. You click on a 'new vampire' li
### DIRECTIONS
- Make a new Express app called `vampires`.
- Use the `vampires_express` starter code.
- Run `npm install` to install all the dependencies that are already in `package.json`.
@ -170,6 +170,28 @@ The commit message should read: <br>
<hr>
### BONUS - STYLING
Add styling to your page
Express can access static assets like css files, images, and front-end javascript so that you can make your pages look and behave nicely.
First, tell express to look in the 'public' folder for static assets:
```
app.use(express.static('public'));
```
Next, create a `public` folder in the root of the project. Express will interpret the public folder as the root your static assets.
In your public folder make a style.css and add some stuff in the file.
Link your style.css in one of your views in the normal way with the `link` tag in the head of the html.
<hr>
** Commit your work.** <br>
The commit message should read: <br>
"Commit 8: added static assets".
<hr>
### NOTES ON FORMS

@ -0,0 +1,36 @@
![ga](http://mobbook.generalassemb.ly/ga_cog.png)
# WDI-PANTHALASSA
---
Title: Arithmetic or Geometric <br>
Type: Morning Exercise <br>
Duration: 45 mins <br>
Creator: Thom Page <br>
Course: WDIr-Panthalassa<br>
---
## Arithmetic or Geometric sequence?
Write a method `arith_geo` that takes an **array of numbers** and returns the string "Arithmetic" if the sequence in the array follows an arithmetic pattern, or returns "Geometric" if it follows a geometric pattern. If the sequence doesn't follow either pattern return -1.
An **arithmetic sequence** is one where the difference between each of the numbers is consistent, eg. the difference between each number is `5`.
Whereas in a **geometric sequence**, each term after the first is multiplied by some constant or common ratio.
```
Arithmetic example: [2, 4, 6, 8]
```
```
Arithmetic example: [20, 28, 36, 44]
```
```
Geometric example: [2, 6, 18, 54]
```
```
Geometric example: [6, 12, 24, 48]
```
Loading…
Cancel
Save