Skip to content
Permalink
Browse files
added exercises
  • Loading branch information
aa7401 committed Feb 19, 2019
1 parent 2a30e42 commit 7549bd89a9dade2bac2c24c4ffda2b1fbe8da2db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
@@ -210,7 +210,7 @@ There are a couple of notable things about the `img` element:
| src | For locating the image file. The file path is normally given as relative path, starting from the directory where the HTML file is located. |
| alt | For displaying an alternative text if the image cannot be displayed, or if the user prefers using a screen reader for accessibility purposes. |

#### 3.3.1 Test Your Knowledge
#### 3.3.1 Test Your Understanding

1. Find photographs of the following computers and upload to the `images/` directory you created:
1. Sinclair ZX Spectrum
@@ -231,7 +231,7 @@ Now we will learn how to embed audio in a website. There are a number of resourc
2. Firefox needs an `.ogg` encoded version.
3. You can also embed a [YouTube](https://www.youtube.com) video in an `<iframe>` or alternatively using the `<object>` element. This is achieved by clicking on the share button then on the **embed** link that is displayed. You copy the html code into your website.

#### 3.4.1 Test Your Knowledge
#### 3.4.1 Test Your Understanding

1. Add the `guitar` audio file to the `index.html` web page. The file has been provided in the two required formats.
1. Test that the audio plays in both Firefox and Chrome.
@@ -263,7 +263,7 @@ Verify that you understand the elements used in marking up the table:

> A summary of all HTML table tags can be found [here](http://www.w3schools.com/html/html_tables.asp).
### 4.1 Test your understanding
### 4.1 Test your Understanding

1. Modify the table structure to contain a column for Spectravideo home computer. Its data is: Spectravideo SV-328, Zilog Z80A CPU, 64kB RAM, 32kB ROM.
2. Generate two additional rows where each row should have a multi-column cell (use `colspan` attribute):
@@ -91,10 +91,11 @@ const sqr = num => num * num

### 1.2.1 Test Your Understanding

//TODO: add an exercise on function expressions.

1. Refactor the `remainder2` function expression to take advantage of the implicit return (you will need to reduce it to a single line of code).
2. Compare this to the original version: which is more _readable_?
3. Create a function expression that takes two string parameters and returns the longest string and assign this to a constant called `longest. check this works correctly.
4. Modify the function expression so that it can handle any number of string parameters (use a _rest parameter_).
5. Can you reduce this function expression to a single line (hint: explore using the [reduce function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce) combined with the [ternary operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator))?
### 1.3 Callbacks

0 comments on commit 7549bd8

Please sign in to comment.